3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arguments = "ahoj ahoj hello"; var_dump(ereg_replace('\w+', ' ', $arguments)); var_dump(preg_replace('/\w+/', ' ', $arguments));
based on A2hoL
Output for 7.0.0 - 7.3.0beta1
Fatal error: Uncaught Error: Call to undefined function ereg_replace() in /in/hQI17:5 Stack trace: #0 {main} thrown in /in/hQI17 on line 5
Process exited with code 255.
Output for hhvm-3.10.1 - 3.17.3
string(7) " " string(7) " "
Output for 5.3.0 - 5.6.30
Deprecated: Function ereg_replace() is deprecated in /in/hQI17 on line 5 string(17) "ahoj ahoj hello" string(7) " "
Output for 4.3.0 - 5.2.17
string(17) "ahoj ahoj hello" string(7) " "