3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $myArray = array( '@@warning_count' => 2, array( 'level' => 'Warning', 'code' => 1266, 'message' => "Incorrect integer value: ‘Johny’ for column ‘billing_cycle’ at row 1"), array( 'level' => 'Warning', 'code' => 1266, 'message' => "Incorrect integer value: ‘Johny’ for column ‘billing_cycle’ at row 1"), ); print "Warning Count: {$myArray['@@warning_count']}\n"; foreach ($myArray as $key => $value){ if (is_array($value)){ foreach ($value as $subKey => $subValue){ print $subKey . "=>" . $subValue; } } }
Output for 4.3.0 - 7.1.0
Warning Count: 2 level=>Warningcode=>1266message=>Incorrect integer value: ‘Johny’ for column ‘billing_cycle’ at row 1level=>Warningcode=>1266message=>Incorrect integer value: ‘Johny’ for column ‘billing_cycle’ at row 1