3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_export( preg_match( '/(?<0>[a-z]+) (?<1>\d+)/in', 'Foo 411', $m ) ? $m : [] );
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: preg_match(): Compilation failed: subpattern name must start with a non-digit at offset 3 in /in/97lST on line 4 array ( )
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28
Warning: preg_match(): Unknown modifier 'n' in /in/97lST on line 7 array ( )

preferences:
156.12 ms | 402 KiB | 121 Q