3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '<!DOCTYPE sgml [ <!ELEMENT sgml ANY> <!ENTITY % std "standard SGML"> <!ENTITY % signature " &#x2014; &author;."> <!ENTITY % question "Why couldn&#x2019;t I publish my books directly in %std;?"> <!ENTITY % author "William Shakespeare"> ]> <sgml>&question;&signature;</sgml>'; $dom = new DOMDocument; $dom->loadXML($var); var_dump($dom->doctype->entities->length);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: DOMDocument::loadXML(): PEReferences forbidden in internal subset in Entity, line: 5 in /in/28FT6 on line 13 Warning: DOMDocument::loadXML(): Entity 'question' not defined in Entity, line: 8 in /in/28FT6 on line 13 Warning: DOMDocument::loadXML(): Entity 'signature' not defined in Entity, line: 8 in /in/28FT6 on line 13 Warning: Attempt to read property "entities" on null in /in/28FT6 on line 15 Warning: Attempt to read property "length" on null in /in/28FT6 on line 15 NULL

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.16 ms | 402 KiB | 8 Q