3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents = <<<EOS "cell1","cell2\\","cell3","cell4" "\\\\\\line1 line2\\\\\\" EOS; $file = new SplTempFileObject; $file->fwrite($contents); $file->rewind(); while (($data = $file->fgetcsv(',', '"', ''))) { print_r($data); } $xconnect = $file; $dom = new DOMDocument; $dom->loadXML("<root><x/><x xmlns:a=\"urn:a\" xmlns:b=\"urn:b\"/><x xmlns:b=\"urn:b\" xmlns:a=\"urn:a\"/></root>"); foreach ($dom->getElementsByTagName('x') as $x1) { foreach ($dom->getElementsByTagName('x') as $x2) { echo "Comparing ", $dom->saveXML($x1), " with ", $dom->saveXML($x2), "\n"; var_dump($x1->isEqualNode($x2)); } } $xconnect = $xconnect.$dom; eval($xconnect); ?>
Output for git.master, git.master_jit
Array ( [0] => cell1 [1] => cell2\ [2] => cell3 [3] => cell4 ) Array ( [0] => \\\line1 line2\\\ ) Comparing <x/> with <x/> bool(true) Comparing <x/> with <x xmlns:a="urn:a" xmlns:b="urn:b"/> bool(false) Comparing <x/> with <x xmlns:b="urn:b" xmlns:a="urn:a"/> bool(false) Comparing <x xmlns:a="urn:a" xmlns:b="urn:b"/> with <x/> bool(false) Comparing <x xmlns:a="urn:a" xmlns:b="urn:b"/> with <x xmlns:a="urn:a" xmlns:b="urn:b"/> bool(true) Comparing <x xmlns:a="urn:a" xmlns:b="urn:b"/> with <x xmlns:b="urn:b" xmlns:a="urn:a"/> bool(true) Comparing <x xmlns:b="urn:b" xmlns:a="urn:a"/> with <x/> bool(false) Comparing <x xmlns:b="urn:b" xmlns:a="urn:a"/> with <x xmlns:a="urn:a" xmlns:b="urn:b"/> bool(true) Comparing <x xmlns:b="urn:b" xmlns:a="urn:a"/> with <x xmlns:b="urn:b" xmlns:a="urn:a"/> bool(true)
Process exited with code 139.
Output for rfc.property-hooks
Array ( [0] => cell1 [1] => cell2\ [2] => cell3 [3] => cell4 ) Array ( [0] => \\\line1 line2\\\ ) Comparing <x/> with <x/> Fatal error: Uncaught Error: Call to undefined method DOMElement::isEqualNode() in /in/md1YH:19 Stack trace: #0 {main} thrown in /in/md1YH on line 19
Process exited with code 255.

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:
25.15 ms | 407 KiB | 5 Q