3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
7