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(); } 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.0070.04047.76
7.1.70.0130.03045.52
7.1.60.0230.04045.59
7.1.50.0230.04345.49
7.1.00.0170.11050.75
7.0.200.0160.02345.10
7.0.140.0200.10050.43
7.0.60.0270.10348.45
7.0.50.0270.09046.40
7.0.40.0070.07348.26
7.0.30.0370.06748.26
7.0.20.0430.11348.30
7.0.10.0130.12748.09
7.0.00.0330.10048.32
5.6.280.0130.10749.86
5.6.210.0400.07349.68
5.6.200.0100.12047.07
5.6.190.0200.11049.00
5.6.180.0270.11049.34
5.6.170.0270.07349.30
5.6.160.0270.10349.22
5.6.150.0130.08347.09
5.6.140.0270.09346.98
5.6.130.0100.11347.01
5.6.120.0030.07749.77
5.6.110.0200.05749.83
5.6.100.0170.07049.98
5.6.90.0130.10749.97
5.6.80.0270.08349.29
5.5.350.4230.06749.19
5.5.340.0130.11046.81
5.5.330.0200.11048.96
5.5.320.0400.09349.07
5.5.310.0330.11049.13
5.5.300.0200.10746.90
5.5.290.0030.11046.77
5.5.280.0130.06049.56
5.5.270.0170.11349.73
5.5.260.0200.07349.67
5.5.250.0170.09349.44
5.5.240.0100.09749.19
5.4.450.0070.06748.19
5.4.440.0200.10348.17
5.4.430.0230.10348.29
5.4.420.0130.11048.29
5.4.410.0170.10048.03
5.4.400.0170.10347.86
5.4.390.0170.10347.86
5.4.380.0130.07747.77
5.4.370.0100.06047.74
5.4.360.0070.08347.79
5.4.350.0200.08047.93
5.4.340.0070.06047.80
5.4.320.0130.06048.00
5.4.310.0030.06047.77
5.4.300.0130.05047.83
5.4.290.0130.05747.96
5.4.280.0270.05047.77
5.4.270.0070.06347.86
5.4.260.0100.05347.86
5.4.250.0170.05747.98
5.4.240.0200.04347.74
5.4.230.0130.05047.95
5.4.220.0070.06347.78
5.4.210.0030.06047.87
5.4.200.0130.06047.79
5.4.190.0170.06347.90
5.4.180.0200.05347.93
5.4.170.0000.06747.80
5.4.160.0000.06347.77
5.4.150.0100.05748.01
5.4.140.0070.07045.21
5.4.130.0270.09745.27
5.4.120.0070.07745.15
5.4.110.0130.09345.09
5.4.100.0100.10745.25
5.4.90.0200.09745.36
5.4.80.0070.09045.22
5.4.70.0270.07345.29
5.4.60.0170.09045.30
5.4.50.0130.10045.33
5.4.40.0070.08345.33
5.4.30.0170.08045.02
5.4.20.0130.08045.07
5.4.10.0070.07745.21
5.4.00.0230.08744.74
5.3.290.0070.07043.77
5.3.280.0100.05343.85
5.3.270.0030.06343.82
5.3.260.0070.06043.82
5.3.250.0100.05343.73
5.3.240.0170.07743.85
5.3.230.0100.10043.67
5.3.220.0200.10343.70
5.3.210.0070.07043.81
5.3.200.0270.07343.68
5.3.190.0170.07343.82
5.3.180.0230.11043.69
5.3.170.0030.08743.77
5.3.160.0200.06043.65
5.3.150.0130.08343.76
5.3.140.0200.10343.85
5.3.130.0070.12743.79
5.3.120.0130.08343.78
5.3.110.0170.08343.68
5.3.100.0100.06343.16
5.3.90.0270.09343.12
5.3.80.0070.06743.05
5.3.70.0200.09043.14
5.3.60.0030.07743.23
5.3.50.0130.09343.13
5.3.40.0100.06042.98
5.3.30.0230.07343.28
5.3.20.0070.06742.87
5.3.10.0200.08042.72
5.3.00.0200.10042.68
5.2.170.0070.10339.93
5.2.160.0170.05739.90
5.2.150.0030.05740.00
5.2.140.0230.09040.34
5.2.130.0170.09039.88
5.2.120.0070.10039.86
5.2.110.0130.08040.01
5.2.100.0100.08740.02
5.2.90.0100.10039.92
5.2.80.0170.08739.85
5.2.70.0100.07739.77
5.2.60.0130.10040.15
5.2.50.0100.09339.78
5.2.40.0230.08040.40
5.2.30.0170.09339.87
5.2.20.0300.08039.91
5.2.10.0130.09740.21
5.2.00.0070.06012.08
5.1.60.0030.04012.08
5.1.50.0000.05012.08
5.1.40.0100.04312.08
5.1.30.0030.03712.08
5.1.20.0000.05312.08
5.1.10.0030.04712.08
5.1.00.0070.05012.08
5.0.50.0000.05012.08
5.0.40.0000.04712.08
5.0.30.0030.06712.08
5.0.20.0000.03012.08
5.0.10.0000.04312.08
5.0.00.0070.05012.08
4.4.90.0000.02012.08
4.4.80.0000.02312.08
4.4.70.0030.03312.08
4.4.60.0000.03012.08
4.4.50.0030.02712.08
4.4.40.0000.04712.08
4.4.30.0070.03012.08
4.4.20.0030.02712.08
4.4.10.0070.03012.08
4.4.00.0000.05712.08
4.3.110.0000.03012.08
4.3.100.0000.02312.08
4.3.90.0030.03012.08
4.3.80.0000.05712.08
4.3.70.0000.03712.08
4.3.60.0000.03012.08
4.3.50.0030.02712.08
4.3.40.0000.03712.08
4.3.30.0000.03312.08
4.3.20.0000.03312.08
4.3.10.0000.03712.08
4.3.00.0000.03712.08

preferences:
36.11 ms | 401 KiB | 5 Q