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.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
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.34
Warning: preg_match(): Unknown modifier 'n' in /in/97lST on line 7 array ( )

preferences:
70.2 ms | 1252 KiB | 4 Q