3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public field_home_thumbs } $node = New Foo(); $node->field_home_thumbs = array('value' => array('field_home_description' => array(array('value' => 'foo')))); $name = 'field_home_thumbs'; $flexifiledname = 'field_home_description'; $string_node = '$node->' . $name . '[0][value][' . $flexifiledname . '][0][value]'; echo "$string_node\n"; exec($string_node); $string_node = '$node->' . $name . "[0]['value']['" . $flexifiledname . "'][0]['value']"; echo "$string_node\n";
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected 'field_home_thumbs' (T_STRING), expecting variable (T_VARIABLE) in /in/ueQEF on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/ueQEF on line 4
Process exited with code 255.