3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo preg_match('/(\.(?!php))$/i','test.PHP')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.php')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.EXE')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.exe')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.zip')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.ZIP')."\n"; echo preg_match('/(\.(?!(php|exe))$/i','test.ok')."\n";echo preg_match('/(\.(?!(php|\.exe))$/i','test.OK');
based on m5JOQ
Output for 4.3.11 - 5.6.28, 7.0.0 - 7.1.0
0 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 3 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 4 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 5 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 6 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 7 Warning: preg_match(): Compilation failed: missing ) at offset 17 in /in/O4168 on line 8 Warning: preg_match(): Compilation failed: missing ) at offset 19 in /in/O4168 on line 8
Output for 4.3.0 - 4.3.10, hhvm-3.10.0 - 3.13.2
0 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 3 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 4 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 5 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 6 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 7 Warning: Compilation failed: missing ) at offset 17 in /in/O4168 on line 8 Warning: Compilation failed: missing ) at offset 19 in /in/O4168 on line 8