3v4l.org

run code in 500+ PHP versions simultaneously
<?php error_reporting(E_ALL); $regex = '/^\d+(?:(?:,\d+)+|:\d+)$/'; echo "range 1 - 8192\n"; var_dump(preg_match($regex, implode(',', range(1, 8192)))); var_dump(preg_last_error_msg()); echo "range 1 - 8193\n"; var_dump(preg_match($regex, implode(',', range(1, 8193)))); var_dump(preg_last_error_msg());
Output for 7.4.0 - 7.4.33
range 1 - 8192 int(1) Fatal error: Uncaught Error: Call to undefined function preg_last_error_msg() in /in/66PlR:10 Stack trace: #0 {main} thrown in /in/66PlR on line 10
Process exited with code 255.
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.34, 8.3.0 - 8.3.35, 8.4.1 - 8.4.26, 8.5.0 - 8.5.11
range 1 - 8192 int(1) string(8) "No error" range 1 - 8193 bool(false) string(25) "JIT stack limit exhausted"

preferences:
32.18 ms | 1500 KiB | 9 Q