3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace X; $iterator = new \RegexIterator( new \ArrayIterator( ['A.phpt', 'B.phpt', 'C.phpt'] ) , '/\.phpt$/' , \RegexIterator::MATCH ) ; foreach ($iterator as $foo) { var_dump($foo); pcre_study('/\.phpt$/', '', ''); } echo "Done", PHP_EOL;
based on qbjZj
Output for 7.0.0 - 7.2.0
string(6) "A.phpt" Fatal error: Uncaught Error: Call to undefined function X\pcre_study() in /in/5ckJ4:19 Stack trace: #0 {main} thrown in /in/5ckJ4 on line 19
Process exited with code 255.
Output for 5.4.0 - 5.6.28
string(6) "A.phpt" Fatal error: Call to undefined function X\pcre_study() in /in/5ckJ4 on line 19
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/5ckJ4 on line 8
Process exited with code 255.