3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = (object)array( 'BP' => '123', 'Skus' => (object)array( (object)array('sku' => '1'), (object)array('sku' => '2'), (object)array('sku' => '3'), ) ); var_dump($a);
based on 3uKUD
Output for 7.2.0
object(stdClass)#5 (2) { ["BP"]=> string(3) "123" ["Skus"]=> object(stdClass)#4 (3) { ["0"]=> object(stdClass)#1 (1) { ["sku"]=> string(1) "1" } ["1"]=> object(stdClass)#2 (1) { ["sku"]=> string(1) "2" } ["2"]=> object(stdClass)#3 (1) { ["sku"]=> string(1) "3" } } }
Output for 5.3.19 - 7.1.10
object(stdClass)#5 (2) { ["BP"]=> string(3) "123" ["Skus"]=> object(stdClass)#4 (3) { [0]=> object(stdClass)#1 (1) { ["sku"]=> string(1) "1" } [1]=> object(stdClass)#2 (1) { ["sku"]=> string(1) "2" } [2]=> object(stdClass)#3 (1) { ["sku"]=> string(1) "3" } } }