Is it possible to add a method/function in this way, like
$arr = array( \"nid\"=> 20, \"title\" => \"Something\", \"value\" => \"Somethi
This is now possible to achieve in PHP 7.1 with anonymous classes
$node = new class { public $property; public function myMethod($arg) { ... } }; // and access them, $node->property; $node->myMethod('arg');