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 new(){ return new B(); } } $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.0090.01218.36
8.3.50.0120.00721.14
8.3.40.0060.00918.77
8.3.30.0000.01519.22
8.3.20.0070.00020.23
8.3.10.0040.00423.56
8.3.00.0000.00819.38
8.2.180.0210.00016.50
8.2.170.0120.00322.96
8.2.160.0030.01020.39
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00620.25
8.2.110.0000.00822.08
8.2.100.0070.00417.75
8.2.90.0000.00819.08
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0040.00419.88
8.2.30.0020.00518.18
8.2.20.0070.00017.63
8.2.10.0000.00818.17
8.2.00.0000.00817.63
8.1.280.0140.00425.92
8.1.270.0070.00023.96
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.92
8.1.230.0040.00719.16
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0050.00318.64
8.1.160.0030.00321.92
8.1.150.0000.00718.91
8.1.140.0040.00417.44
8.1.130.0040.00417.83
8.1.120.0040.00417.54
8.1.110.0030.00517.51
8.1.100.0040.00417.36
8.1.90.0040.00417.37
8.1.80.0000.00717.46
8.1.70.0000.00817.43
8.1.60.0000.00817.65
8.1.50.0000.00817.54
8.1.40.0040.00417.38
8.1.30.0080.00017.73
8.1.20.0040.00417.65
8.1.10.0060.00317.48
8.1.00.0040.00417.38
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00718.51
8.0.270.0040.00416.82
8.0.260.0030.00317.22
8.0.250.0070.00016.86
8.0.240.0000.00816.93
8.0.230.0040.00416.92
8.0.220.0000.00716.93
8.0.210.0030.00516.84
8.0.200.0030.00316.96
8.0.190.0050.00316.96
8.0.180.0040.00416.93
8.0.170.0000.00716.80
8.0.160.0070.00016.93
8.0.150.0070.00016.86
8.0.140.0030.00316.86
8.0.130.0030.00313.30
8.0.120.0040.00416.75
8.0.110.0000.00716.88
8.0.100.0000.00816.78
8.0.90.0070.00016.77
8.0.80.0030.01216.82
8.0.70.0040.00416.88
8.0.60.0050.00216.90
8.0.50.0000.00716.96
8.0.30.0090.01617.15
8.0.20.0160.00417.40
8.0.10.0000.00716.98
8.0.00.0140.00316.74
7.4.330.0000.00515.02
7.4.320.0040.00416.37
7.4.300.0030.00316.60
7.4.290.0030.00316.50
7.4.280.0040.00416.49
7.4.270.0040.00416.57
7.4.260.0070.00016.49
7.4.250.0000.00716.57
7.4.240.0050.00216.62
7.4.230.0000.00716.52
7.4.220.0090.00916.50
7.4.210.0030.01116.57
7.4.200.0020.00516.58
7.4.160.0030.01216.56
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0070.01016.30
7.4.120.0090.01216.52
7.4.110.0140.00316.51
7.4.100.0030.01716.60
7.4.90.0160.00416.51
7.4.80.0120.00919.39
7.4.70.0090.01216.52
7.4.60.0110.00616.54
7.4.50.0000.00416.22
7.4.40.0070.01016.61
7.4.30.0030.01416.45
7.4.00.0090.00714.72
7.3.330.0030.00313.07
7.3.320.0000.00613.30
7.3.310.0030.00316.33
7.3.300.0070.00016.36
7.3.290.0080.01116.26
7.3.280.0120.00616.24
7.3.270.0110.00717.40
7.3.260.0060.01216.45
7.3.250.0080.01016.63
7.3.240.0070.01016.42
7.3.230.0110.00716.42
7.3.210.0130.00316.52
7.3.200.0130.01019.39
7.3.190.0090.01216.39
7.3.180.0070.01016.33
7.3.170.0120.00916.43
7.3.160.0060.01516.38
7.3.120.0020.01414.79
7.3.110.0030.01414.93
7.3.100.0030.01214.67
7.3.90.0050.01215.00
7.3.80.0050.01114.72
7.3.70.0060.00614.87
7.3.60.0050.00914.85
7.3.50.0030.01014.81
7.3.40.0050.00914.85
7.3.30.0040.00914.66
7.3.20.0120.00216.81
7.3.10.0100.00716.63
7.3.00.0030.01216.65
7.2.330.0030.01316.48
7.2.320.0070.01016.69
7.2.310.0080.00816.71
7.2.300.0070.01016.86
7.2.290.0140.01216.83
7.2.250.0080.01014.96
7.2.240.0110.00815.13
7.2.230.0050.01215.11
7.2.220.0040.01215.26
7.2.210.0060.00715.11
7.2.200.0040.00815.04
7.2.190.0050.01015.23
7.2.180.0050.00915.01
7.2.170.0030.01115.00
7.2.60.0100.00716.90
7.2.00.0000.01119.54
7.1.330.0070.00815.94
7.1.320.0070.00515.78
7.1.310.0050.01015.83
7.1.300.0080.00515.68
7.1.290.0060.00615.92
7.1.280.0050.00815.76
7.1.270.0050.00815.81
7.1.260.0070.01015.68
7.1.200.0030.01415.46
7.1.100.0030.01018.08
7.1.70.0040.00417.16
7.1.60.0100.01319.32
7.1.50.0120.01216.96
7.1.00.0000.09022.31
7.0.200.0040.00416.92
7.0.140.0000.08022.00
7.0.60.0100.06720.04
7.0.50.0070.08017.92
7.0.40.0000.06020.26
7.0.30.0570.04320.06
7.0.20.0300.07320.18
7.0.10.0000.05020.06
7.0.00.0070.04320.12
5.6.280.0070.07020.90
5.6.210.0170.06020.73
5.6.200.0100.08318.20
5.6.190.0070.06020.47
5.6.180.0130.07720.43
5.6.170.0200.08320.62
5.6.160.0130.07020.57
5.6.150.0070.08018.17
5.6.140.0070.07018.14
5.6.130.0000.04318.15
5.6.120.0100.08321.11
5.6.110.0070.06021.15
5.6.100.0130.08021.00
5.6.90.0100.06021.11
5.6.80.0100.07720.54
5.5.350.0100.07320.33
5.5.340.0070.03717.95
5.5.330.0070.05020.42
5.5.320.0370.05320.36
5.5.310.0230.08020.37
5.5.300.0070.04717.92
5.5.290.0100.05017.98
5.5.280.0070.05320.97
5.5.270.0070.07320.74
5.5.260.0030.07720.98
5.5.250.0070.07720.59
5.5.240.0030.07020.13
5.4.450.0800.06319.34
5.4.440.0100.06719.57
5.4.430.1000.05019.33
5.4.420.0800.04719.29
5.4.410.0900.07019.11
5.4.400.0570.04319.26
5.4.390.0230.05319.15
5.4.380.0930.05719.28
5.4.370.0770.05319.24
5.4.360.0630.06318.98
5.4.350.0870.04719.14
5.4.340.0110.04412.04
5.4.320.0100.04012.53
5.4.310.0060.03812.52
5.4.300.0040.03812.52
5.4.290.0080.03712.52
5.4.280.0070.03312.41
5.4.270.0060.03512.41
5.4.260.0060.03912.41
5.4.250.0060.03812.41
5.4.240.0080.03412.41
5.4.230.0040.04012.41
5.4.220.0100.03212.41
5.4.210.0050.03612.41
5.4.200.0070.03712.40
5.4.190.0040.03912.40
5.4.180.0060.03712.40
5.4.170.0050.03912.41
5.4.160.0090.03512.40
5.4.150.0110.03312.40
5.4.140.0100.03512.09
5.4.130.0040.03612.07
5.4.120.0070.03512.04
5.4.110.0120.03912.03
5.4.100.0060.04112.03
5.4.90.0050.03812.03
5.4.80.0030.04012.04
5.4.70.0050.03512.03
5.4.60.0040.03712.03
5.4.50.0040.03612.03
5.4.40.0110.03012.02
5.4.30.0100.03312.01
5.4.20.0070.03412.01
5.4.10.0090.03212.02
5.4.00.0050.03711.50
5.3.290.0050.04012.80
5.3.280.0050.04012.71
5.3.270.0080.04012.72
5.3.260.0110.03812.72
5.3.250.0110.05012.71
5.3.240.0050.04812.72
5.3.230.0080.03712.71
5.3.220.0070.03812.68
5.3.210.0060.03912.68
5.3.200.0030.03912.68
5.3.190.0080.03612.68
5.3.180.0070.03512.68
5.3.170.0110.03512.67
5.3.160.0050.03712.67
5.3.150.0050.03912.67
5.3.140.0060.03612.66
5.3.130.0060.04312.66
5.3.120.0050.04312.66
5.3.110.0080.03612.66
5.3.100.0030.03912.13
5.3.90.0070.03512.11
5.3.80.0050.03612.11
5.3.70.0060.03612.10
5.3.60.0090.03412.09
5.3.50.0060.03512.03
5.3.40.0060.03612.04
5.3.30.0060.03411.99
5.3.20.0080.03311.77
5.3.10.0060.03511.74
5.3.00.0030.03911.72
5.2.170.0060.0299.22
5.2.160.0040.0309.22
5.2.150.0070.0279.23
5.2.140.0030.0319.22
5.2.130.0060.0279.18
5.2.120.0040.0289.18
5.2.110.0030.0309.19
5.2.100.0050.0279.18
5.2.90.0060.0279.18
5.2.80.0050.0299.17
5.2.70.0040.0309.18
5.2.60.0090.0259.13
5.2.50.0030.0319.10
5.2.40.0070.0269.07
5.2.30.0050.0299.04
5.2.20.0020.0319.04
5.2.10.0020.0308.95
5.2.00.0060.0318.81
5.1.60.0060.0228.09
5.1.50.0050.0298.09
5.1.40.0040.0248.07
5.1.30.0050.0268.41
5.1.20.0030.0278.45
5.1.10.0050.0258.16
5.1.00.0060.0238.17
5.0.50.0050.0196.64
5.0.40.0020.0206.50
5.0.30.0020.0326.32
5.0.20.0040.0216.28
5.0.10.0050.0186.26
5.0.00.0030.0336.25
4.4.90.0040.0174.78
4.4.80.0030.0154.76
4.4.70.0030.0154.76
4.4.60.0040.0154.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0050.0134.76
4.4.20.0010.0174.84
4.4.10.0020.0164.85
4.4.00.0030.0254.76
4.3.110.0040.0154.67
4.3.100.0020.0154.67
4.3.90.0030.0144.64
4.3.80.0010.0264.59
4.3.70.0020.0154.63
4.3.60.0020.0214.62
4.3.50.0030.0204.63
4.3.40.0040.0224.53
4.3.30.0020.0153.30
4.3.20.0020.0163.28
4.3.10.0020.0153.24
4.3.00.0200.0176.99

preferences:
46.79 ms | 401 KiB | 5 Q