3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testValue = str_repeat('A', 100000); function testXML($enc, $val) { $xml = new DomDocument('1.0', $enc); $xml->appendChild($xml->createElement('foo', $val)); $xml = $xml->saveXML(); $xml2 = new DomDocument('1.0', $enc); $xml2->loadXML($xml); return strlen($xml2->firstChild->nodeValue); } function d($enc, $size) { echo sprintf("%25s -> %s\n", $enc, $size); } d('Original size', strlen($testValue)); d('BIG-5', testXML('BIG-5', $testValue)); d('SHIFT-JIS', testXML('SHIFT-JIS', $testValue)); d('SHIFT_JIS', testXML('SHIFT_JIS', $testValue)); d('Shift_JIS', testXML('Shift_JIS', $testValue)); d('UTF-8', testXML('UTF-8', $testValue)); d('ASCII', testXML('ASCII', $testValue)); d('ISO-8859-1', testXML('ISO-8859-1', $testValue));
Output for git.master, git.master_jit, rfc.property-hooks
Original size -> 100000 BIG-5 -> 100000 SHIFT-JIS -> 100000 SHIFT_JIS -> 100000 Shift_JIS -> 100000 UTF-8 -> 100000 ASCII -> 100000 ISO-8859-1 -> 100000

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:
49.3 ms | 401 KiB | 8 Q