3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dom = new DOMDocument('1.0'); for ($i=0; $i<=1000000; ++$i) { $root = $dom->createElement('message'); $dom->appendChild($root); $content = $dom->createElement('content'); $root->appendChild($content); $content->appendChild($dom->createTextNode('Example content baz')); }
Output for 7.0.3 - 7.0.5, 7.0.14 - 7.1.0
Fatal error: Uncaught TypeError: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k:8 Stack trace: #0 /in/YTE0k(8): DOMNode->appendChild(false) #1 {main} thrown in /in/YTE0k on line 8
Process exited with code 255.
Output for 7.0.0 - 7.0.2, 7.0.10
Fatal error: Uncaught TypeError: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k:5 Stack trace: #0 /in/YTE0k(5): DOMNode->appendChild(false) #1 {main} thrown in /in/YTE0k on line 5
Process exited with code 255.
Output for 7.0.6 - 7.0.9
Fatal error: Uncaught TypeError: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k:7 Stack trace: #0 /in/YTE0k(7): DOMNode->appendChild(false) #1 {main} thrown in /in/YTE0k on line 7
Process exited with code 255.
Output for 5.2.8, 5.2.10, 5.2.12 - 5.3.6, 5.3.27 - 5.3.28, 5.4.1 - 5.4.4, 5.4.7 - 5.4.11, 5.4.17, 5.4.44 - 5.5.0, 5.5.5, 5.5.8 - 5.5.11, 5.5.22, 5.5.28 - 5.5.34, 5.6.1 - 5.6.2, 5.6.5, 5.6.21, 5.6.24, 5.6.28
Catchable fatal error: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k on line 8
Process exited with code 255.
Output for 5.2.6 - 5.2.7, 5.2.11, 5.3.7 - 5.3.8, 5.3.14, 5.3.29 - 5.4.0, 5.4.6, 5.4.12 - 5.4.14, 5.5.12 - 5.5.21, 5.5.23 - 5.5.27, 5.6.0, 5.6.6 - 5.6.11, 5.6.18 - 5.6.20, 5.6.23, 5.6.25
Catchable fatal error: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k on line 7
Process exited with code 255.
Output for 5.2.9, 5.3.9 - 5.3.13, 5.3.15 - 5.3.26, 5.4.5, 5.4.15 - 5.4.16, 5.4.18 - 5.4.43, 5.5.1 - 5.5.4, 5.5.6 - 5.5.7, 5.5.35 - 5.5.38, 5.6.3 - 5.6.4, 5.6.12 - 5.6.17, 5.6.22
Catchable fatal error: Argument 1 passed to DOMNode::appendChild() must be an instance of DOMNode, boolean given in /in/YTE0k on line 5
Process exited with code 255.
Output for 5.2.3 - 5.2.5
Warning: DOMNode::appendChild() expects parameter 1 to be DOMNode, boolean given in /in/YTE0k on line 5 Fatal error: Call to a member function appendChild() on a non-object in /in/YTE0k on line 7
Process exited with code 255.
Output for 5.2.2
Warning: DOMNode::appendChild() expects parameter 1 to be DOMNode, boolean given in /in/YTE0k on line 8 Warning: DOMNode::appendChild() expects parameter 1 to be DOMNode, boolean given in /in/YTE0k on line 5 Fatal error: Call to a member function appendChild() on a non-object in /in/YTE0k on line 7
Process exited with code 255.
Output for 5.2.0 - 5.2.1
Warning: DOMNode::appendChild() expects parameter 1 to be DOMNode, boolean given in /in/YTE0k on line 7 Fatal error: Call to a member function appendChild() on a non-object in /in/YTE0k on line 8
Process exited with code 255.
Output for 5.0.0 - 5.1.6

Process exited with code 137.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: domdocument in /in/YTE0k on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: domdocument in /in/YTE0k on line 2