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";

preferences:
44.06 ms | 402 KiB | 5 Q