3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = ')(8234@#$ABCFG3478&* hello'; $chars = implode("",range('a','z')) . implode("",range('A','Z')) . implode("",range(0,9)); $str = strpbrk($string, $chars); if($str !== false){ echo $str[0]; }else{ echo "No non-special character found"; }
Output for 5.6.40, 7.1.0, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
8

preferences:
99.91 ms | 1484 KiB | 4 Q