nikic / scalar_objects

Extension that adds support for method calls on primitive types in PHP
MIT License
1.13k stars 44 forks source link

Construct inline object syntax #26

Closed ParkFramework closed 8 years ago

ParkFramework commented 8 years ago

Probably better to implement - construct inline object syntax? Syntex should look like PHP arrays and JSON.

Example:


$object = 
{
   "key" => $value
};

API
$object->keys(); $object->split(); $object->join();
nikic commented 8 years ago

This feature is outside the scope of this extension -- it's not possible to implement that kind of syntax from an extension, it requires a language parser patch.