3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = preg_match('[asdf]','asdf'); echo array_flip(get_defined_constants(true)['pcre'])[preg_last_error()];
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: array_flip(): Can only flip string and integer values, entry skipped in /in/FGbcG on line 4 PREG_NO_ERROR
Output for 7.3.24 - 7.3.33, 7.4.12 - 7.4.33
Warning: array_flip(): Can only flip STRING and INTEGER values! in /in/FGbcG on line 4 PREG_NO_ERROR
Output for 7.1.6
PREG_NO_ERROR

preferences:
108.23 ms | 401 KiB | 115 Q