3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function fox( $a) { return $a . 'fox!'; } function dog( $b) { return $b . 'dog!'; } $a = 'A'; $b = 'B'; $string = 'The quick brown {{fox($a);}} jumped over the lazy {{dog($b);}}.'; $regex = '/{{([^}]+)+}}/e'; $result = preg_replace( $regex, '$1', $string); var_dump( $result);
Output for 7.0.0 - 7.1.0
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/GOi2l on line 8 NULL
Output for 5.5.24 - 5.6.28
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /in/GOi2l on line 8 string(49) "The quick brown Afox! jumped over the lazy Bdog!."
Output for 4.3.0 - 5.4.45
string(49) "The quick brown Afox! jumped over the lazy Bdog!."