PHP Taskbook Level 7.6

Задание 1

Given a text file. Get the percentage of each character. Write the result to a new file.

Задание 2

The file contains Russian text. Open this file, convert the text to transliteration and write it to a new file.

Задание 3

Given a text file, shuffle the lines in this file in random order.

Задание 4

Get a list of all possible lucky tickets. A ticket is a string of six digits, possibly with leading zeros. A ticket is lucky if the sum of the first three digits equals the sum of the second three digits. Write the resulting list to a file, each ticket on a new line.

Задание 5

Write a program that will generate the following array:

php[
  'x',
  'xx',
  'xxx',
  'xxxx',
  'xxxxx',
]
Задание 6

Given such an object:

php<?php
  $data = [
    2018: [
      11: [
        29: [1, 2, 3],
        30: [4, 5],
      ],
      12: [
        30: [6, 7],
        31: [8, 9],
      ],
    ],
    2019: [
      12: [
        29: [10, 11],
        30: [12, 13],
        31: [14, 15],
      ]
    ],
  ]
?>

Write all the elements of this object into some array, like this:

php[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]