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></q></p></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)
7.2.00.0170.03847.73
7.1.70.0170.02445.43
7.1.60.0300.05345.61
7.1.50.0170.04745.34
7.1.00.0100.11350.73
7.0.200.0100.02945.23
7.0.140.0230.09750.47
7.0.70.0230.12750.03
7.0.60.0170.06349.95
7.0.50.0030.07350.41
7.0.40.0130.12348.45
7.0.30.0170.06748.46
7.0.20.0300.08048.38
7.0.10.0070.11048.42
7.0.00.0170.06748.54
5.6.280.0300.09049.87
5.6.220.0270.10349.57
5.6.210.0170.11049.51
5.6.200.0200.12349.90
5.6.190.0300.10349.79
5.6.180.0170.05749.78
5.6.170.0170.09749.81
5.6.160.0170.07749.93
5.6.150.0130.10749.89
5.6.140.0030.10049.89
5.6.130.0130.07049.89
5.6.120.0200.06749.93
5.6.110.0230.10749.87
5.6.100.0130.11049.94
5.6.90.0230.09049.77
5.6.80.0130.09749.21
5.6.70.0170.07049.25
5.6.60.0100.12349.24
5.6.50.0130.07749.20
5.6.40.0170.11049.04
5.6.30.0100.11049.32
5.6.20.0230.11049.22
5.6.10.0100.06749.06
5.6.00.0170.06049.26
5.5.360.0270.10049.26
5.5.350.0100.08049.33
5.5.340.0170.11049.73
5.5.330.0100.09749.55
5.5.320.0130.08749.63
5.5.310.0030.09349.73
5.5.300.0130.08349.80
5.5.290.0270.11049.80
5.5.280.0170.08749.70
5.5.270.0230.10749.66
5.5.260.0230.11349.77
5.5.250.0230.11349.58
5.5.240.0130.07349.13
5.5.230.0130.12048.95
5.5.220.0200.11349.02
5.5.210.0230.11049.03
5.5.200.0100.11349.15
5.5.190.0200.10349.09
5.5.180.0270.10049.00
5.5.160.0070.10749.02
5.5.150.0100.07049.14
5.5.140.0170.11748.99
5.5.130.0300.10349.03
5.5.120.0200.05749.11
5.5.110.0130.08048.86
5.5.100.0100.08048.78
5.5.90.0130.11348.94
5.5.80.0330.10048.94
5.5.70.0270.09748.84
5.5.60.0230.11048.99
5.5.50.0170.10748.89
5.5.40.0130.10349.07
5.5.30.0200.08748.96
5.5.20.0030.07749.03
5.5.10.0200.11348.87
5.5.00.0230.10348.69
5.4.450.0100.10748.07
5.4.440.0230.10047.95
5.4.430.0230.10348.24
5.4.420.0200.09047.95
5.4.410.0100.10748.11
5.4.400.0170.09347.87
5.4.390.0230.06047.61
5.4.380.0170.11047.91
5.4.370.0100.08347.99
5.4.360.0130.09747.94
5.4.350.0200.10747.75
5.4.340.0130.11047.79
5.4.320.0100.06047.88
5.4.310.0100.08047.94
5.4.300.0100.09047.86
5.4.290.0270.06347.73
5.4.280.0200.07347.90
5.4.270.0130.06047.95
5.4.260.0100.07747.73
5.4.250.0230.10747.98
5.4.240.0230.08348.10
5.4.230.0270.09747.93
5.4.220.0200.10347.95
5.4.210.0170.11347.82
5.4.200.0100.11747.82
5.4.190.0130.06047.85
5.4.180.0100.06047.93
5.4.170.0200.10047.95
5.4.160.0170.08047.63
5.4.150.0200.10747.72
5.4.140.0230.09745.12
5.4.130.0100.06345.26
5.4.120.0070.08745.22
5.4.110.0070.09045.23
5.4.100.0200.10745.16
5.4.90.0100.08045.27
5.4.80.0070.06745.27
5.4.70.0130.06345.28
5.4.60.0170.09745.29
5.4.50.0130.07745.17
5.4.40.0170.09745.16
5.4.30.0230.09745.32
5.4.20.0200.10345.13
5.4.10.0130.06345.13
5.4.00.0170.05744.75
5.3.290.0230.10043.88
5.3.280.0170.10343.78
5.3.270.0130.12043.66
5.3.260.0200.10743.90
5.3.250.0170.11743.65
5.3.240.0300.10043.64
5.3.230.0300.10343.68
5.3.220.0230.09743.82
5.3.210.0170.06743.81
5.3.200.0170.06743.82
5.3.190.0100.07043.75
5.3.180.0170.10743.62
5.3.170.0100.11343.79
5.3.160.0230.10743.75
5.3.150.0200.10343.71
5.3.140.0170.11743.75
5.3.130.0070.11743.75
5.3.120.0270.10343.59
5.3.110.0200.09743.73
5.3.100.0200.10343.25
5.3.90.0230.08743.02
5.3.80.0130.11042.99
5.3.70.0130.07343.13
5.3.60.0070.08043.15
5.3.50.0130.08343.08
5.3.40.0200.05343.04
5.3.30.0200.07043.05
5.3.20.0200.09742.92
5.3.10.0200.09742.70
5.3.00.0300.09742.61
5.2.170.0170.09340.11
5.2.160.0100.10040.11
5.2.150.0070.06040.15
5.2.140.0230.07340.20
5.2.130.0100.07040.11
5.2.120.0230.08040.16
5.2.110.0230.09040.07
5.2.100.0130.10340.08
5.2.90.0130.10040.06
5.2.80.0170.09040.07
5.2.70.0100.07740.09
5.2.60.0070.10340.02
5.2.50.0170.09040.02
5.2.40.0130.04739.96
5.2.30.0130.05339.81
5.2.20.0170.04740.12
5.2.10.0130.05039.90
5.2.00.0000.03712.20
5.1.60.0030.02012.20
5.1.50.0030.02312.20
5.1.40.0000.02312.20
5.1.30.0000.02712.20
5.1.20.0000.02712.20
5.1.10.0030.02312.20
5.1.00.0000.02712.20
5.0.50.0000.04312.20
5.0.40.0000.02312.20
5.0.30.0000.03312.20
5.0.20.0030.01712.20
5.0.10.0070.04312.20
5.0.00.0000.05012.20
4.4.90.0000.03712.20
4.4.80.0030.03012.20
4.4.70.0000.01312.20
4.4.60.0000.01712.20
4.4.50.0030.02712.20
4.4.40.0000.02312.20
4.4.30.0000.01312.20
4.4.20.0030.01312.20
4.4.10.0000.01312.20
4.4.00.0000.02712.20
4.3.110.0000.01712.20
4.3.100.0000.01312.20
4.3.90.0030.01012.20
4.3.80.0000.05312.20
4.3.70.0030.02012.20
4.3.60.0000.01712.20
4.3.50.0000.02712.20
4.3.40.0030.05312.20
4.3.30.0000.03312.20
4.3.20.0000.04012.20
4.3.10.0070.03312.20
4.3.00.0000.03012.20

preferences:
33.4 ms | 400 KiB | 5 Q