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(); } if (function_exists('gc_collect_cycles')) 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.0240.02147.73
7.1.70.0110.02545.39
7.1.60.0140.06845.79
7.1.50.0210.02745.19
7.1.00.0130.13050.80
7.0.200.0130.03345.02
7.0.140.0130.10050.38
7.0.100.0500.12348.74
7.0.90.0530.11748.52
7.0.80.0100.10348.53
7.0.70.0430.11348.48
7.0.60.0600.11748.48
7.0.50.0770.11348.85
7.0.40.0300.12048.45
7.0.30.0130.13048.42
7.0.20.0200.09048.57
7.0.10.0200.07348.50
7.0.00.0300.10048.55
5.6.280.0200.10049.85
5.6.250.0170.12349.38
5.6.240.0470.11349.49
5.6.230.0170.12049.61
5.6.220.0170.12749.43
5.6.210.0170.09349.38
5.6.200.0170.13049.95
5.6.190.0330.12049.79
5.6.180.0270.09049.80
5.6.170.0100.14749.92
5.6.160.0130.07049.88
5.6.150.0270.12749.97
5.6.140.0330.09749.94
5.6.130.0170.13349.96
5.6.120.0170.13349.82
5.6.110.0270.09749.90
5.6.100.0330.11349.54
5.6.90.0200.08349.92
5.6.80.0270.08049.28
5.6.70.0100.07049.32
5.6.60.0130.06749.33
5.6.50.0230.05749.38
5.6.40.0070.06349.31
5.6.30.0130.10749.15
5.6.20.0130.06049.39
5.6.10.0170.05749.29
5.6.00.0270.04749.16
5.5.380.0300.11749.39
5.5.370.0300.13349.36
5.5.360.0100.13749.38
5.5.350.0270.11349.27
5.5.340.0300.10049.77
5.5.330.0300.11049.79
5.5.320.0130.07049.69
5.5.310.0230.11049.79
5.5.300.0300.10749.62
5.5.290.0170.06349.67
5.5.280.0330.08749.75
5.5.270.0230.11349.62
5.5.260.0170.11349.77
5.5.250.0300.11749.45
5.5.240.0170.05749.18
5.5.230.0170.05748.98
5.5.220.0200.08349.20
5.5.210.0130.08749.07
5.5.200.0130.06349.18
5.5.190.0170.07049.19
5.5.180.0070.08349.04
5.5.160.0100.07349.13
5.5.150.0130.06048.94
5.5.140.0230.04748.95
5.5.130.0170.05349.12
5.5.120.0130.06049.12
5.5.110.0130.06748.91
5.5.100.0100.06049.01
5.5.90.0170.07749.08
5.5.80.0070.06748.96
5.5.70.0100.05749.05
5.5.60.0130.05749.06
5.5.50.0100.06048.80
5.5.40.0200.09048.91
5.5.30.0200.08749.07
5.5.20.0270.09749.00
5.5.10.0470.09748.97
5.5.00.0230.10048.98
5.4.450.0500.09048.05
5.4.440.0300.09348.04
5.4.430.0230.07348.25
5.4.420.0100.06048.13
5.4.410.0200.08748.19
5.4.400.0130.05747.93
5.4.390.0070.06347.73
5.4.380.0130.06047.95
5.4.370.0030.06347.82
5.4.360.0100.06747.93
5.4.350.0100.06047.89
5.4.340.0100.06347.89
5.4.320.0270.05347.67
5.4.310.0170.05347.92
5.4.300.0170.06347.92
5.4.290.0100.06047.66
5.4.280.0100.05047.99
5.4.270.0170.06347.92
5.4.260.0030.06747.86
5.4.250.0070.06347.72
5.4.240.0100.06047.92
5.4.230.0170.05347.88
5.4.220.0130.05747.99
5.4.210.0130.04347.72
5.4.200.0100.06347.98
5.4.190.0170.10047.80
5.4.180.0170.09047.81
5.4.170.0270.09747.82
5.4.160.0170.09347.97
5.4.150.0170.09347.91
5.4.140.0230.09745.33
5.4.130.0070.06345.32
5.4.120.0200.10045.04
5.4.110.0330.08345.16
5.4.100.0270.08344.94
5.4.90.0230.09345.26
5.4.80.0200.07745.24
5.4.70.0270.09045.21
5.4.60.0100.07345.14
5.4.50.0130.09045.23
5.4.40.0200.08745.23
5.4.30.0230.07345.02
5.4.20.0130.10345.17
5.4.10.0130.10345.27
5.4.00.0070.08344.68
5.3.290.0070.06343.86
5.3.280.0130.06043.80
5.3.270.0100.12043.87
5.3.260.0230.10343.79
5.3.250.0230.10043.92
5.3.240.0130.09743.80
5.3.230.0270.10343.82
5.3.220.0370.06743.80
5.3.210.0230.09743.78
5.3.200.0200.11343.77
5.3.190.0230.06743.62
5.3.180.0300.07343.82
5.3.170.0030.07743.62
5.3.160.0300.07743.65
5.3.150.0230.10043.76
5.3.140.0230.08043.77
5.3.130.0270.10043.67
5.3.120.0100.12043.76
5.3.110.0200.07343.76
5.3.100.0330.08343.25
5.3.90.0170.06743.22
5.3.80.0200.09043.14
5.3.70.0300.07343.03
5.3.60.0100.08043.16
5.3.50.0230.09343.25
5.3.40.0270.08043.09
5.3.30.0200.09043.05
5.3.20.0300.12359.34
5.3.10.0230.11759.23
5.3.00.0100.12059.32
5.2.170.0100.07040.11
5.2.160.0170.08740.16
5.2.150.0170.08740.13
5.2.140.0200.06339.95
5.2.130.0170.07740.08
5.2.120.0030.10340.16
5.2.110.0130.08740.11
5.2.100.0100.10740.07
5.2.90.0270.08739.97
5.2.80.0170.09740.08
5.2.70.0070.09040.06
5.2.60.0300.08040.00
5.2.50.0170.08739.98
5.2.40.0130.09039.77
5.2.30.0100.05340.03
5.2.20.0170.06040.00
5.2.10.0070.07739.90
5.2.00.0030.06310.86
5.1.60.0000.02710.60
5.1.50.0030.03310.60
5.1.40.0030.03710.60
5.1.30.0030.05310.60
5.1.20.0030.04710.60
5.1.10.0000.04310.60
5.1.00.0030.05010.60
5.0.50.0000.04710.60
5.0.40.0100.03310.60
5.0.30.0070.06010.60
5.0.20.0070.01310.60
5.0.10.0030.04010.60
5.0.00.0000.06710.60
4.4.90.0070.02710.60
4.4.80.0000.01310.60
4.4.70.0000.01710.60
4.4.60.0030.02010.60
4.4.50.0030.02010.60
4.4.40.0000.02310.60
4.4.30.0030.03310.60
4.4.20.0030.02710.60
4.4.10.0030.02010.60
4.4.00.0030.05710.60
4.3.110.0030.03310.60
4.3.100.0100.02710.60
4.3.90.0000.02710.60
4.3.80.0000.03310.60
4.3.70.0000.01710.60
4.3.60.0000.03710.60
4.3.50.0070.03010.60
4.3.40.0030.03710.60
4.3.30.0070.03010.60
4.3.20.0000.01310.60
4.3.10.0000.02010.60
4.3.00.0030.02710.60

preferences:
29.32 ms | 400 KiB | 5 Q