3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '1234@#$ABCFG3478&*'; if (preg_match('/[a-z]/i', $string, $match)) { $firstLetter = $match[0]; } else { // there's no letters in string } echo $firstLetter;
based on spouT
Output for 4.3.0 - 7.2.0
A