3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $_shippingRateGroups = array('count' => 1, array( 'flatrate' => array( 'Standard UK delivery', 'Special UK delivery' ), 'flatrate2' => array( 'Something1' ) )); foreach($_shippingRateGroups as $code => $_rates) { echo count($_rates).'/n'; } var_dump($_shippingRateGroups);
based on dgltG
Output for 4.3.0 - 7.1.0
1/n2/narray(2) { ["count"]=> int(1) [0]=> array(2) { ["flatrate"]=> array(2) { [0]=> string(20) "Standard UK delivery" [1]=> string(19) "Special UK delivery" } ["flatrate2"]=> array(1) { [0]=> string(10) "Something1" } } }