3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = preg_grep('#\d#u', ['a', "1\xFF", 'c']); var_dump(preg_last_error()); var_dump($res);
based on JXpF2
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.10, 8.0.0alpha1 - beta3
int(4) array(0) { }