3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( '123', '13', '1 3', '31', '21', '321', '23', '2', '3', '', ' 12', ); $counter = 0; foreach ( $array as $tunnus ) { $counter += (int) preg_match( '#1#', $tunnus ); } echo $counter;
Output for 4.3.0 - 7.2.0
7