PHP Taskbook Level 9.4

Задание 1

Given a folder containing pictures. When you enter a page, display a random picture from this folder.

Задание 2

Make a page that any user can visit and leave a comment. The user should see all the comments previously left by other users.

Задание 3

Given some URL:

php$url = 'http://test.com/dir1/dir2/dir3/page.html';

Get a sequential set of folders from it:

php[
  '/dir1/dir2/dir3/',
  '/dir2/dir3/',
  '/dir3/'
]
Задание 4

Given an arbitrary two-dimensional array:

php[
  [11, 12, 13, 14, 15],
  [21, 22, 23, 24, 25],
  [31, 32, 33, 34, 35],
  [41, 42, 43, 44, 45],
  [51, 52, 53, 54, 55],
]

Get the array of elements of its secondary diagonal:

php[
  15, 24, 33, 42, 51
]