String Parts in PHP

strchrstrrchrstrstrmb_strrchrmb_strrichrmb_strstrmb_stristr
Задание 1

Given a string:

php<?php
  $str = 'ab-cd-ef';
?>

Using the strchr function, output the following string to the screen:

php'-cd-ef'
Задание 2

Given a string:

php<?php
  $str = 'ab-cd-ef';
?>

Using the strrchr function, output the following string to the screen:

php'-ef'
Задание 3

Given a string:

php<?php
  $str = 'ab--cd--ef';
?>

Using the strstr function, output the following string to the screen:

php'--cd--ef'
Задание 4

Given a string:

php<?php
  $str = 'программирование-на-php';
?>

Using the mb_strrchr function, output the part of the string after the last hyphen:

php'-php'
Задание 5

Given a string:

php<?php
  $str = 'Привет-Мир-Пока';
?>

Using the mb_strrichr function (case-insensitive) find the substring starting from the first occurrence of 'мир':

php'-Мир-Пока'
Задание 6

Given a string:

php<?php
  $str = 'Функции-для-работы-со-строками';
?>

Using the mb_strstr function, output the part of the string starting from the first occurrence of 'работы':

php'-работы-со-строками'
Задание 7

Given a string:

php<?php
  $str = 'ппп ррр ссс ттт ууу';
?>

Using mb_stristr, find the substring starting from 'РРР' (case-insensitive).

php'ррр ссс ттт ууу'
Задание 8

Given a string:

php<?php
  $str = 'Тестирование-многобайтовых-функций';
?>

Using the mb_strrchr function, output the part of the string after the last hyphen:

php'-функций'
Задание 9

Given a string:

php<?php
  $str = 'Пример-Поиска-Подстроки-В-Тексте';
?>

Using the mb_strrichr function (case-insensitive) find the substring starting from the first occurrence of 'тексте':

php'-В-Тексте'