3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Abusive script

This script was stopped while abusing our resources

Output for 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
Deprecated: Creation of dynamic property Node::$foo is deprecated in /in/PgqlG on line 183 Deprecated: Creation of dynamic property Tree::$1 is deprecated in /in/PgqlG on line 80 Deprecated: Creation of dynamic property Node::$bar is deprecated in /in/PgqlG on line 183 Deprecated: Creation of dynamic property Tree::$53 is deprecated in /in/PgqlG on line 80 Deprecated: Creation of dynamic property Node::$baz is deprecated in /in/PgqlG on line 183 Deprecated: Creation of dynamic property Tree::$921 is deprecated in /in/PgqlG on line 80 Deprecated: Creation of dynamic property NodeList::$53 is deprecated in /in/PgqlG on line 67 Deprecated: Creation of dynamic property NodeList::$921 is deprecated in /in/PgqlG on line 67 Display the entire tree (This is a fully recursive tree that can be looked up at any point) Tree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) Get the middle node id 53 Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) Get the child count of node id 53: 1 Get the children of node 1: NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) Get the depth of the tree node id 921: 2 Get the depth of the tree node id 53: 1 Remove the children of node id 53: Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) Display the list of nodes after removing the children of node id 53: Tree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => 0 [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => 2 [children] => [baz] => baz ) )
Output for 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29
Display the entire tree (This is a fully recursive tree that can be looked up at any point) Tree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) Get the middle node id 53 Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) Get the child count of node id 53: 1 Get the children of node 1: NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) Get the depth of the tree node id 921: 2 Get the depth of the tree node id 53: 1 Remove the children of node id 53: Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) Display the list of nodes after removing the children of node id 53: Tree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => 0 [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => 2 [children] => [baz] => baz ) )
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 247 Display the entire tree (This is a fully recursive tree that can be looked up at any point)PHP_EOLTree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 249 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 251 Get the middle node id 53PHP_EOLNode Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 253 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 253 PHP_EOLPHP_EOLGet the child count of node id 53: 1 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 256 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 256 PHP_EOLPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 258 Get the children of node 1: PHP_EOLNodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => [children] => NodeList Object ( [length] => 1 [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => [children] => NodeList Object ( [length] => 0 ) [baz] => baz ) ) [bar] => bar ) ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 260 PHP_EOLGet the depth of the tree node id 921: 2 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 263 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 263 PHP_EOLPHP_EOLGet the depth of the tree node id 53: 1 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 266 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 266 PHP_EOLPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 268 Remove the children of node id 53:PHP_EOLNode Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 270 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/PgqlG on line 272 Display the list of nodes after removing the children of node id 53:PHP_EOLTree Object ( [length] => 3 [1] => Node Object ( [id] => 1 [name] => somename1 [parent] => [depth] => 0 [children] => NodeList Object ( [length] => 1 [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) ) [foo] => foo ) [53] => Node Object ( [id] => 53 [name] => somename2 [parent] => 1 [depth] => 1 [children] => [bar] => bar ) [921] => Node Object ( [id] => 921 [name] => somename3 [parent] => 53 [depth] => 2 [children] => [baz] => baz ) )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/PgqlG on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/PgqlG on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/PgqlG on line 10
Process exited with code 255.

preferences:
196.65 ms | 441 KiB | 5 Q