3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* * This should produce failures when using a version of libpcre older than 8.32 */ // Ignore versions other than 5.3-5.5 if (!preg_match('/^5\.[345]\./', phpversion())) { print "Don't care about this version\n"; exit(0); } preg_match('/((?:a?)*)*c/', 'aac', $matches); if ($matches[1] === 'aa') { print "FAIL\n"; } else { print "PASS\n"; }
Output for 4.3.0 - 5.2.17, 5.6.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Don't care about this version
Output for 5.3.19 - 5.3.29, 5.4.9 - 5.5.35
PASS
Output for 5.3.0 - 5.3.18, 5.4.0 - 5.4.8
FAIL