<?php $obj = new stdClass(); $obj->p1 = "foo"; $obj->p2 = "bar"; echo $obj['p1'];
Standard input is empty
Standard output is empty
PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /home/H3DY5y/prog.php:8
Stack trace:
#0 {main}
thrown in /home/H3DY5y/prog.php on line 8