3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test() {echo "THIS SHOULD NOT BE SEEN!!\n";} function ryat($a) {var_dump($a);} $str = "', test(), '"; echo "\npreg_replace()\n"; //var_dump(preg_replace('/^(.*)$/e', "ryat('\\1')", $str)); var_dump(preg_replace_callback('/^(.*)$/e', "ryat", $str));
based on tb82R
Output for 7.0.0 - 7.1.0
preg_replace() Warning: preg_replace_callback(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/iMqei on line 10 NULL
Output for hhvm-3.12.0
preg_replace() Warning: Modifier /e cannot be used with replacement callback. in /in/iMqei on line 10 NULL
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.0 - 5.6.28
preg_replace() Warning: preg_replace_callback(): Modifier /e cannot be used with replacement callback in /in/iMqei on line 10 NULL
Output for 5.0.0 - 5.1.6
preg_replace() Warning: preg_replace_callback(): /e modifier cannot be used with replacement callback in /in/iMqei on line 10 NULL
Output for 4.3.0 - 4.4.9
preg_replace() Warning: /e modifier cannot be used with replacement callback in /in/iMqei on line 10 NULL