3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $A='one\\"two'; echo strlen($A); var_dump($A); $Input= 'zero:("),one:(\\"),two:(\\\\"),three:(\\\\\\"),four:(\\\\\\\\"),five:(\\\\\\\\\\"),six:(\\\\\\\\\\\\")'; preg_match_all( "/[^\\]*((\\{2})*)(['\"])(.)*\1/U", $Input, $Matches); var_dump($Matches);
based on tkVsN
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
8string(8) "one\"two" Warning: preg_match_all(): Compilation failed: unmatched parentheses at offset 19 in /in/jmkg5 on line 7 NULL
Output for hhvm-3.22.0
8string(8) "one\"two" Warning: Compilation failed: unmatched parentheses at offset 19 in /in/jmkg5 on line -1 NULL
Output for hhvm-3.18.5 - 3.21.3
8string(8) "one\"two" Warning: Compilation failed: unmatched parentheses at offset 19 in /in/jmkg5 on line 7 NULL