<?php // your code goes here $a = (object) [0 => 'aaa']; $b = new stdClass; $b->{0} = 'aaa';
Standard input is empty
object(stdClass)#1 (1) { [0]=> string(3) "aaa" } NULL object(stdClass)#2 (1) { ["0"]=> string(3) "aaa" } string(3) "aaa"
PHP Notice: Undefined property: stdClass::$0 in /home/qNctPB/prog.php on line 5