3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = array("^.", "."); $r = array("Х", "*"); $fam = "Перегудов"; $fam = preg_replace($s, $r, $fam); //$fam = preg_replace("@^.@e", "", $fam); //$fam = preg_replace("@.@e", "-", $fam); echo $fam; //echo preg_replace($s, $r, $fam);
Output for 5.2.5 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): No ending delimiter '^' found in /in/UP63b on line 5
Output for hhvm-3.10.0 - 3.12.0
Warning: No ending delimiter '^' found: [^.] in /in/UP63b on line 5
Output for 4.3.11 - 5.0.5, 5.1.1 - 5.2.4
Warning: preg_replace(): No ending delimiter '^' found in /in/UP63b on line 5 Warning: preg_replace(): No ending delimiter '.' found in /in/UP63b on line 5 Перегудов
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/UP63b on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.10
Warning: No ending delimiter '^' found in /in/UP63b on line 5 Warning: No ending delimiter '.' found in /in/UP63b on line 5 Перегудов