3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = new \DOMText('string'); var_dump($s);
Output for 8.3.0 - 8.3.4, 8.3.6
object(DOMText)#1 (22) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> NULL ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["parentElement"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["isConnected"]=> bool(false) ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 object(DOMText)#1 (22) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> NULL ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["parentElement"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["isConnected"]=> bool(false) ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
object(DOMText)#1 (20) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["previousElementSibling"]=> NULL ["nextElementSibling"]=> NULL ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }
Output for 7.3.16 - 7.3.33, 7.4.4 - 7.4.33
object(DOMText)#1 (18) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["childNodes"]=> string(22) "(object value omitted)" ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }
Output for 7.1.2 - 7.1.20, 7.2.0 - 7.2.33, 7.4.0
object(DOMText)#1 (18) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["childNodes"]=> NULL ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["nextSibling"]=> NULL ["attributes"]=> NULL ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }
Output for 7.1.0 - 7.1.1
object(DOMText)#1 (17) { ["wholeText"]=> string(6) "string" ["data"]=> string(6) "string" ["length"]=> int(6) ["nodeName"]=> string(5) "#text" ["nodeValue"]=> string(6) "string" ["nodeType"]=> int(3) ["parentNode"]=> NULL ["childNodes"]=> NULL ["firstChild"]=> NULL ["lastChild"]=> NULL ["previousSibling"]=> NULL ["attributes"]=> NULL ["namespaceURI"]=> NULL ["prefix"]=> string(0) "" ["localName"]=> NULL ["baseURI"]=> NULL ["textContent"]=> string(6) "string" }

preferences:
157.35 ms | 402 KiB | 162 Q