I'm not sure if json syntax is better than PHP here: $object = (object)[ 'property'=>$value, 'method'=>function(){...} ]; $object->property; $object->method->__invoke();
S.A.N wrote on 24.02.2015 19:37: > Would have been more useful, inline sintex like JSON: > > $object = > { > 'property': $value, > 'method': function (){...} > }; > > $object->property; > $object->method(); > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php