3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = ""; $word = "die('Lalala'); 1||1/e\0"; // Slightly contrived example, but let's pretend we're // case-normalizing a user-provided word, and forgot to // preg_quote $text = preg_replace('/'.$word.'/i', $word, $text);
based on JlE7P
Output for 5.4.7 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Null byte in regex in /in/uWrso on line 8
Output for hhvm-3.10.0 - 3.12.0
Fatal error: Error: Null byte found in pattern in /in/uWrso on line 8
Process exited with code 255.
Output for 5.3.0 - 5.4.6
Warning: Unexpected character in input: ' in /in/uWrso(8) : regexp code on line 1 Lalala
Output for 4.3.0 - 5.2.17
Lalala