3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr =[ [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000016", "code" => "10001", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000023", "code" => "10001", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000214", "code" => "20003", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000221", "code" => "20003", ], [ "websites" => "base", "simples_skus" => "", "sku" => "8681455000245", "code" => "23443", ] ]; function merge($carry, $item){ echo $carry . "\n" . $item . "\n\n"; } $result = array_reduce(array_values($arr), "merge"); //var_dump($result);
based on auJIf
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Notice: Array to string conversion in /in/DTRbp on line 37 Array Notice: Array to string conversion in /in/DTRbp on line 37 Array Notice: Array to string conversion in /in/DTRbp on line 37 Array Notice: Array to string conversion in /in/DTRbp on line 37 Array Notice: Array to string conversion in /in/DTRbp on line 37 Array