3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "9hsfgh563452"; preg_match_all("/[0-9]/",$string,$matches); echo "Array size: " . count($matches)."</br>"; //Returns 1 echo "Array size: " . sizeof($matches)."</br>"; //Returns 1 print_r($matches);
Output for 4.3.0 - 7.1.0
Array size: 1</br>Array size: 1</br>Array ( [0] => Array ( [0] => 9 [1] => 5 [2] => 6 [3] => 3 [4] => 4 [5] => 5 [6] => 2 ) )