3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $field_home_thumbs; } $node = New Foo(); $node->field_home_thumbs = array(array('value' => array('field_home_description' => array(array('value' => 'foo'))))); echo $node->field_home_thumbs[0]['value']['field_home_description'][0]['value'], "\n"; $name = 'field_home_thumbs'; $flexifiledname = 'field_home_description'; echo str_repeat('=', 50), "\n"; $string_node = "\$node->$name[0][value][$flexifiledname][0][value];"; echo $string_node, "\n"; echo eval("return $string_node"), "\n"; echo str_repeat('=', 50), "\n"; $string_node = "\$node->$name[0]['value']['$flexifiledname'][0]['value'];"; echo $string_node, "\n"; echo eval("return $string_node"), "\n";
Output for git.master, git.master_jit, rfc.property-hooks
foo ================================================== $node->f[value][field_home_description][0][value]; Fatal error: Uncaught Error: Undefined constant "value" in /in/t6EbT(18) : eval()'d code:1 Stack trace: #0 /in/t6EbT(18): eval() #1 {main} thrown in /in/t6EbT(18) : eval()'d code on line 1
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.37 ms | 401 KiB | 8 Q