3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $_count = 0; private $_number; function __construct() { $this->_number = ++static::$_count; } public function __toString(){ return static::$_count . ' | ' . $this->_number . "\n"; } public function __invoke(){ return $this->_number; } } class B { private $_status = array(); } class C { public static function newInstance(){ return new C(); } } $a = new A(); $b = new A(); $c = new A(); $d = new A(); echo $a, $b, $c, $d; echo $a(), $b(), $c(), $d();

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)
8.3.60.0150.00618.43
8.3.50.0110.00821.14
8.3.40.0040.01118.84
8.3.30.0090.00619.18
8.3.20.0070.00020.34
8.3.10.0000.00823.61
8.3.00.0000.00819.25
8.2.180.0040.01118.54
8.2.170.0070.00722.96
8.2.160.0110.00420.34
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00322.29
8.2.110.0060.00322.13
8.2.100.0030.00917.74
8.2.90.0040.00419.20
8.2.80.0000.00817.97
8.2.70.0080.00017.60
8.2.60.0080.00019.78
8.2.50.0000.00818.07
8.2.40.0050.00319.94
8.2.30.0000.00818.14
8.2.20.0080.00017.63
8.2.10.0040.00418.13
8.2.00.0040.00417.81
8.1.280.0000.01425.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0080.00419.00
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0040.00418.66
8.1.160.0070.00022.02
8.1.150.0090.00018.96
8.1.140.0040.00417.51
8.1.130.0030.00717.83
8.1.120.0000.00717.50
8.1.110.0030.00617.34
8.1.100.0030.00517.41
8.1.90.0000.00717.48
8.1.80.0070.00017.43
8.1.70.0070.00017.42
8.1.60.0000.00917.57
8.1.50.0030.00617.56
8.1.40.0000.00817.47
8.1.30.0050.00317.57
8.1.20.0030.00617.60
8.1.10.0030.00517.61
8.1.00.0050.00317.46
8.0.300.0040.00418.77
8.0.290.0030.00316.75
8.0.280.0050.00218.45
8.0.270.0030.00317.25
8.0.260.0000.00717.26
8.0.250.0030.00316.97
8.0.240.0060.00316.85
8.0.230.0030.00316.99
8.0.220.0030.00316.94
8.0.210.0030.00316.86
8.0.200.0030.00316.95
8.0.190.0080.00016.93
8.0.180.0030.00516.98
8.0.170.0030.00616.80
8.0.160.0000.00716.91
8.0.150.0000.00716.83
8.0.140.0080.00016.91
8.0.130.0030.00313.28
8.0.120.0000.00816.91
8.0.110.0020.00516.81
8.0.100.0070.00016.80
8.0.90.0000.00816.70
8.0.80.0100.00716.86
8.0.70.0000.00716.84
8.0.60.0030.00516.89
8.0.50.0070.00016.80
8.0.30.0170.00617.12
8.0.20.0090.01217.44
8.0.10.0030.00617.04
8.0.00.0050.01616.81
7.4.330.0060.00015.02
7.4.320.0000.00816.50
7.4.300.0030.00316.52
7.4.290.0030.00316.61
7.4.280.0040.00416.58
7.4.270.0050.00316.46
7.4.260.0000.00716.38
7.4.250.0040.00416.56
7.4.240.0040.00316.52
7.4.230.0000.00816.68
7.4.220.0110.00716.71
7.4.210.0140.00016.50
7.4.200.0000.00816.71
7.4.160.0070.00716.60
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0100.01316.50
7.4.120.0060.01216.46
7.4.110.0060.01116.54
7.4.100.0070.01016.68
7.4.90.0130.00316.57
7.4.80.0160.01219.39
7.4.70.0090.00916.41
7.4.60.0120.00316.45
7.4.50.0020.00216.51
7.4.40.0100.00716.43
7.4.30.0070.01116.71
7.4.00.0060.00615.21
7.3.330.0050.00013.32
7.3.320.0060.00013.31
7.3.310.0070.00016.29
7.3.300.0000.00716.27
7.3.290.0100.00616.32
7.3.280.0070.01016.28
7.3.270.0090.00917.40
7.3.260.0120.00416.46
7.3.250.0080.00916.55
7.3.240.0140.00716.58
7.3.230.0110.01116.60
7.3.210.0070.01016.41
7.3.200.0040.01119.39
7.3.190.0110.01016.60
7.3.180.0080.00816.40
7.3.170.0120.00416.39
7.3.160.0120.01016.48
7.3.10.0050.01016.56
7.3.00.0030.01316.73
7.2.330.0120.00616.75
7.2.320.0110.00716.64
7.2.310.0170.00016.77
7.2.300.0000.01716.56
7.2.290.0070.01316.79
7.2.130.0070.01016.90
7.2.120.0080.00316.71
7.2.110.0030.01216.80
7.2.100.0060.00916.89
7.2.90.0100.01016.87
7.2.80.0100.00516.83
7.2.70.0040.01116.92
7.2.60.0100.00716.80
7.2.50.0030.00716.74
7.2.40.0100.01016.92
7.2.30.0150.00916.66
7.2.20.0120.00416.96
7.2.10.0100.00816.79
7.2.00.0060.00918.35
7.1.250.0060.00615.76
7.1.200.0060.00615.75
7.1.100.0030.00618.06
7.1.70.0000.00917.09
7.1.60.0100.01319.32
7.1.50.0100.01616.95
7.1.00.0000.08022.37
7.0.200.0030.00716.89
7.0.140.0070.07022.13
7.0.110.0030.06020.10
7.0.100.0130.07019.97
7.0.90.0130.07320.11
7.0.80.0030.08320.04
7.0.70.0070.04719.91
7.0.60.0130.07019.93
7.0.50.0070.08019.96
7.0.40.0100.08019.79
7.0.30.0100.07019.82
7.0.20.0130.07319.87
7.0.10.0070.08019.71
7.0.00.0130.04319.73
5.6.280.0000.07721.13
5.6.260.0130.05320.61
5.6.250.0030.05020.63
5.6.240.0070.07320.72
5.6.230.0230.07320.57
5.6.220.0130.07720.57
5.6.210.0030.04320.71
5.6.200.0100.08020.59
5.6.190.0000.07720.57
5.6.180.0070.07020.66
5.6.170.0070.08720.69
5.6.160.0070.07320.59
5.6.150.0070.04320.66
5.6.140.0100.07320.86
5.6.130.0030.06320.68
5.6.120.0000.05020.86
5.6.110.0000.04720.64
5.6.100.0100.05720.63
5.6.90.0100.05320.55
5.6.80.0070.07720.07
5.6.70.0070.07020.02
5.6.60.0070.07020.02
5.6.50.0100.07720.00
5.6.40.0100.06719.97
5.6.30.0030.05319.99
5.6.20.0130.03720.00
5.6.10.0030.07319.82
5.6.00.0070.05019.93
5.5.380.0070.08017.52
5.5.370.0100.07717.63
5.5.360.0100.08017.69
5.5.350.0070.04317.63
5.5.340.0070.08018.08
5.5.330.0130.07718.22
5.5.320.0170.06718.10
5.5.310.0100.06017.93
5.5.300.0100.07318.05
5.5.290.0070.07718.10
5.5.280.0130.08017.93
5.5.270.0070.08018.09
5.5.260.0130.07717.90
5.5.250.0130.06718.07
5.5.240.0070.04317.30
5.5.230.0030.07717.60
5.5.220.0130.05717.30
5.5.210.0200.06017.48
5.5.200.0070.07717.48
5.5.190.0070.04317.43
5.5.180.0070.06317.18
5.5.160.0130.06717.28
5.5.150.0200.06017.27
5.5.140.0130.07317.48
5.5.130.0070.07717.60
5.5.120.0130.03317.42
5.5.110.0000.08017.27
5.5.100.0100.07017.18
5.5.90.0100.07317.21
5.5.80.0100.07317.08
5.5.70.0030.04017.16
5.5.60.0030.07717.32
5.5.50.0070.07017.47
5.5.40.0030.07717.34
5.5.30.0000.07317.14
5.5.20.0070.08017.29
5.5.10.0130.03017.33
5.5.00.0030.03717.30
5.4.450.0070.07019.32
5.4.440.0070.07019.55
5.4.430.0100.07319.52
5.4.420.0100.05019.46
5.4.410.0100.06319.18
5.4.400.0070.07718.98
5.4.390.0100.07019.22
5.4.380.0070.06719.17
5.4.370.0030.07019.09
5.4.360.0130.07319.01
5.4.350.0070.07019.34
5.4.340.0070.07019.26
5.4.320.0070.04719.18
5.4.310.0100.07719.24
5.4.300.0070.06719.00
5.4.290.0000.08719.14
5.4.280.0100.06019.33
5.4.270.0070.04319.00
5.4.260.0100.07019.01
5.4.250.0070.07719.00
5.4.240.0100.07319.18
5.4.230.0070.07318.96
5.4.220.0100.05018.94
5.4.210.0070.05318.94
5.4.200.0030.04019.01
5.4.190.0070.07018.94
5.4.180.0030.03319.13
5.4.170.0070.06719.36
5.4.160.0000.07719.12
5.4.150.0100.06719.15
5.4.140.0070.07716.45
5.4.130.0030.06716.56
5.4.120.0070.07016.48
5.4.110.0070.05016.50
5.4.100.0130.07016.48
5.4.90.0070.05316.31
5.4.80.0030.04016.40
5.4.70.0070.07316.30
5.4.60.0230.03716.59
5.4.50.0100.07016.39
5.4.40.0100.07016.61
5.4.30.0100.03316.62
5.4.20.0130.06716.43
5.4.10.0030.07716.43
5.4.00.0070.07015.79
5.3.290.0030.07714.66
5.3.280.0130.03314.75
5.3.270.0070.07014.48
5.3.260.0100.07314.57
5.3.250.0070.07014.47
5.3.240.0130.07014.70
5.3.230.0030.07714.75
5.3.220.0070.07014.66
5.3.210.0000.08014.54
5.3.200.0030.06014.58
5.3.190.0030.08014.57
5.3.180.0130.06714.67
5.3.170.0070.07014.61
5.3.160.0000.07714.56
5.3.150.0070.07014.71
5.3.140.0170.06314.59
5.3.130.0130.06014.66
5.3.120.0030.07714.59
5.3.110.0130.07014.63
5.3.100.0100.07014.01
5.3.90.0000.07714.06
5.3.80.0130.05714.00
5.3.70.0070.04314.01
5.3.60.0070.07713.96
5.3.50.0130.05013.93
5.3.40.0100.06713.94
5.3.30.0130.03313.92
5.3.20.0030.07013.93
5.3.10.0100.04713.64
5.3.00.0030.07013.79
5.2.170.0030.05713.20
5.2.160.0000.04013.20
5.2.150.0100.04713.20
5.2.140.0130.04713.20
5.2.130.0070.03313.20
5.2.120.0030.05313.20
5.2.110.0030.03313.20
5.2.100.0030.06013.20
5.2.90.0030.03313.20
5.2.80.0100.04713.20
5.2.70.0070.04013.20
5.2.60.0000.04313.20
5.2.50.0030.06013.20
5.2.40.0000.03313.20
5.2.30.0030.06013.20
5.2.20.0070.06013.20
5.2.10.0070.05013.20
5.2.00.0030.06313.20
5.1.60.0070.05013.20
5.1.50.0070.05713.20
5.1.40.0100.03713.20
5.1.30.0000.05713.20
5.1.20.0030.03713.20
5.1.10.0070.05013.20
5.1.00.0030.04013.20
5.0.50.0030.02313.20
5.0.40.0100.02313.20
5.0.30.0000.04313.20
5.0.20.0030.04313.20
5.0.10.0000.04313.20
5.0.00.0030.06313.20
4.4.90.0030.02013.20
4.4.80.0030.03313.20
4.4.70.0000.02013.20
4.4.60.0030.01713.20
4.4.50.0030.02013.20
4.4.40.0000.04013.20
4.4.30.0000.03713.20
4.4.20.0000.02013.20
4.4.10.0030.02013.20
4.4.00.0000.04013.20
4.3.110.0030.03013.20
4.3.100.0030.02013.20
4.3.90.0070.02313.20
4.3.80.0030.03313.20
4.3.70.0070.02313.20
4.3.60.0000.03313.20
4.3.50.0030.03013.20
4.3.40.0030.03313.20
4.3.30.0000.03313.20
4.3.20.0000.03713.20
4.3.10.0030.03013.20
4.3.00.0030.03313.20

preferences:
46.61 ms | 401 KiB | 5 Q