3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $obj = (object) 'menu';/* stdClass not parsing correctly with laravel. */ $obj->file = 'stuff'; $obj->url = 'morestuff'; var_dump($obj); $obj2 = new StdClass; $obj2->file = 'stuff'; $obj2->url = 'morestuff'; var_dump($obj2);
based on mUW1H
Output for 5.0.0 - 7.1.0
object(stdClass)#1 (3) { ["scalar"]=> string(4) "menu" ["file"]=> string(5) "stuff" ["url"]=> string(9) "morestuff" } object(stdClass)#2 (2) { ["file"]=> string(5) "stuff" ["url"]=> string(9) "morestuff" }
Output for 4.3.0 - 4.4.9
object(stdClass)(3) { ["scalar"]=> string(4) "menu" ["file"]=> string(5) "stuff" ["url"]=> string(9) "morestuff" } object(stdClass)(2) { ["file"]=> string(5) "stuff" ["url"]=> string(9) "morestuff" }