3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Source: https://bugs.php.net/bug.php?id=62468 class SelfLinked { public $xml; public $me; public function __construct() { $this->xml = simplexml_load_string('<?xml version="1.0" encoding="UTF-8"?> <a><b><c><d><e><f><g><h><i><j><k><l><m><n><o><p><q><r><s><t><u><v><w><x><y><z>waa? </z></y></x></w></v></u></t></s><r></t></r></q></p></o></o></n></m></l></k></j></i></h></g></f></e></d></c></b></a>'); $this->me = $this; } } $b = memory_get_usage(); for ($i = 0; $i < 1000; $i++) { new SelfLinked(); gc_collect_cycles(); } var_dump(memory_get_usage() - $b);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.40.0100.05016.59
5.4.30.0100.05016.41
5.4.20.0130.04316.52
5.4.10.0200.05316.62
5.4.00.0270.06316.00
5.3.140.0200.04314.49
5.3.130.0230.07314.57
5.3.120.0270.05014.50
5.3.110.0230.04014.61
5.3.100.0070.05714.07
5.3.90.0130.05014.06
5.3.80.0230.07014.05
5.3.70.0170.04713.97
5.3.60.0170.04714.07
5.3.50.0200.06013.90
5.3.40.0170.07313.80
5.3.30.0100.04313.91
5.3.20.0230.07013.64
5.3.10.0170.04013.70
5.3.00.0170.04013.66

preferences:
26.99 ms | 400 KiB | 5 Q