Re: [RFC] Anonymous Classes

From: Date: Tue, 24 Feb 2015 19:07:13 +0000
Subject: Re: [RFC] Anonymous Classes
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-83684@lists.php.net to get a copy of this message
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 >

« previous php.internals (#83684) next »