3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function replace_callback($matches){ return $matches[0]; } $str = "abc{123}def{456}ghi{789}jkl"; $result = preg_replace_callback('/\{.*?\}/', 'replace_callback', $str); print_r($result);
Output for 4.3.0 - 5.6.21, hhvm-3.12.0, 7.0.0 - 7.1.0RC5
abc{123}def{456}ghi{789}jkl
Output for hhvm-3.10.0

Process exited with code 153.