3v4l.org

run code in 300+ PHP versions simultaneously
<?php return \preg_match('/a/', $var);
Output for 8.1.0 - 8.1.10
Warning: Undefined variable $var in /in/VAGlk on line 3 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/VAGlk on line 3
Output for 8.0.1 - 8.0.23
Warning: Undefined variable $var in /in/VAGlk on line 3
Output for 7.4.0 - 7.4.30
Notice: Undefined variable: var in /in/VAGlk on line 3

preferences:
17.04 ms | 411 KiB | 5 Q