3v4l.org

run code in 200+ PHP versions simultaneously
<?php $fullname = 'Joe Blow'; if (preg_match('/^ (\S+) # firstname/alias \s+ \S+ # surname $/x', $fullname, $matches)) { print $matches[1] . "\n"; }
Output for 4.3.11 - 7.0.17, 7.0.19 - 7.1.3, 7.1.5 - 7.4.0alpha1
Warning: preg_match(): Unknown modifier 'a' in /in/jh4EJ on line 8
Output for 7.0.18, 7.1.4
Warning: preg_match(): Unknown modifier 'a' in /in/jh4EJ on line 4
Output for 4.3.0 - 4.3.10
Warning: Unknown modifier 'a' in /in/jh4EJ on line 8