3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); $data = "\xe2\x99\xa5"; mb_convert_encoding($data,'8bit'); $data = mb_ereg_replace("heart","\u2665\u2665",$data); var_dump($data); echo $data;
based on P4GZ8
Output for 4.3.4 - 7.2.0
string(3) "♥" ♥
Output for 4.3.2 - 4.3.3
Fatal error: Call to undefined function: mb_ereg_replace() in /in/YI3l9 on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mb_ereg_replace() in /in/YI3l9 on line 6