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 __invoke(){ 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.0130.00718.43
8.3.50.0080.01121.05
8.3.40.0120.00318.44
8.3.30.0140.00018.92
8.3.20.0040.00420.20
8.3.10.0080.00023.63
8.3.00.0000.00919.03
8.2.180.0070.00716.88
8.2.170.0110.00322.96
8.2.160.0130.00320.52
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0090.00020.31
8.2.110.0060.00322.16
8.2.100.0000.01117.75
8.2.90.0000.00719.09
8.2.80.0040.00417.97
8.2.70.0030.00517.36
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0040.00419.82
8.2.30.0040.00418.00
8.2.20.0000.00717.54
8.2.10.0030.00618.04
8.2.00.0030.00517.63
8.1.280.0090.00625.92
8.1.270.0040.00423.95
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0080.00023.88
8.1.230.0070.00319.04
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0000.00817.10
8.1.180.0050.00218.10
8.1.170.0000.00818.46
8.1.160.0030.00322.07
8.1.150.0000.00718.77
8.1.140.0000.00717.32
8.1.130.0040.00417.77
8.1.120.0030.00317.38
8.1.110.0000.00817.30
8.1.100.0000.00717.30
8.1.90.0000.00717.24
8.1.80.0040.00317.23
8.1.70.0000.00717.20
8.1.60.0060.00317.45
8.1.50.0000.00817.40
8.1.40.0030.00617.21
8.1.30.0030.00517.44
8.1.20.0040.00417.52
8.1.10.0030.00517.40
8.1.00.0040.00417.21
8.0.300.0000.00818.77
8.0.290.0070.00016.75
8.0.280.0000.00718.24
8.0.270.0030.00317.10
8.0.260.0060.00017.04
8.0.250.0000.00716.90
8.0.240.0040.00416.88
8.0.230.0000.00816.77
8.0.220.0000.00716.90
8.0.210.0030.00316.74
8.0.200.0050.00316.72
8.0.190.0030.00516.91
8.0.180.0000.00716.84
8.0.170.0000.00816.90
8.0.160.0050.00316.74
8.0.150.0030.00316.79
8.0.140.0070.00016.84
8.0.130.0050.00013.27
8.0.120.0040.00416.77
8.0.110.0000.00716.84
8.0.100.0040.00416.64
8.0.90.0000.00716.82
8.0.80.0060.00916.82
8.0.70.0000.00816.89
8.0.60.0000.00716.84
8.0.50.0000.00816.89
8.0.30.0130.00817.05
8.0.20.0160.01017.40
8.0.10.0040.00416.97
8.0.00.0090.00916.52
7.4.330.0050.00015.02
7.4.320.0040.00416.42
7.4.300.0030.00316.58
7.4.290.0070.00016.64
7.4.280.0000.00816.49
7.4.270.0040.00416.64
7.4.260.0000.00716.59
7.4.250.0050.00216.47
7.4.240.0070.00016.64
7.4.230.0000.00716.30
7.4.220.0090.00916.68
7.4.210.0070.01316.56
7.4.200.0070.00016.41
7.4.160.0120.00316.57
7.4.150.0170.00717.40
7.4.140.0080.00917.86
7.4.130.0110.00616.50
7.4.120.0080.01016.46
7.4.110.0000.01716.53
7.4.100.0080.00916.68
7.4.90.0000.01916.54
7.4.80.0140.01219.39
7.4.70.0100.00716.62
7.4.60.0070.01016.61
7.4.50.0000.00616.61
7.4.40.0090.00916.56
7.4.30.0050.01816.50
7.4.10.0080.00616.36
7.4.00.0080.00915.98
7.3.330.0050.00013.31
7.3.320.0020.00213.21
7.3.310.0070.00016.41
7.3.300.0030.00316.36
7.3.290.0090.00716.36
7.3.280.0080.00816.30
7.3.270.0130.00717.40
7.3.260.0060.01016.48
7.3.250.0080.01016.57
7.3.240.0130.00716.62
7.3.230.0120.00416.39
7.3.210.0090.00916.55
7.3.200.0140.01119.39
7.3.190.0150.00716.60
7.3.180.0060.01016.65
7.3.170.0100.00716.53
7.3.160.0170.00016.53
7.3.130.0090.00816.40
7.3.120.0050.01316.48
7.3.110.0060.00816.38
7.3.100.0070.00716.29
7.3.90.0070.00516.48
7.3.80.0090.00516.37
7.3.70.0070.00516.34
7.3.60.0100.00716.29
7.3.50.0030.01316.25
7.3.40.0030.00816.32
7.3.30.0040.01116.23
7.3.20.0060.01018.22
7.3.10.0070.00718.24
7.3.00.0060.00818.15
7.2.330.0060.01216.81
7.2.320.0120.00616.48
7.2.310.0060.01016.82
7.2.300.0070.01416.44
7.2.290.0070.01116.41
7.2.260.0070.01016.69
7.2.250.0080.01116.56
7.2.240.0070.00716.61
7.2.230.0020.01116.40
7.2.220.0070.01116.68
7.2.210.0100.00716.65
7.2.200.0080.00316.45
7.2.190.0070.00916.47
7.2.180.0110.00816.54
7.2.170.0100.00516.54
7.2.160.0050.00716.59
7.2.150.0050.01018.34
7.2.140.0000.01418.44
7.2.130.0120.00318.41
7.2.120.0060.00818.38
7.2.110.0080.00518.46
7.2.100.0100.00618.36
7.2.90.0090.00818.43
7.2.80.0060.00818.41
7.2.70.0050.00818.23
7.2.60.0060.00718.44
7.2.50.0060.00718.29
7.2.40.0020.01318.33
7.2.30.0030.01318.44
7.2.20.0090.00418.26
7.2.10.0020.01318.33
7.2.00.0030.01318.60
7.1.330.0060.00717.38
7.1.320.0070.00817.43
7.1.310.0050.00717.37
7.1.300.0070.01017.30
7.1.290.0020.01117.29
7.1.280.0060.00817.36
7.1.270.0050.00517.28
7.1.260.0080.00817.34
7.1.250.0030.00917.33
7.1.240.0060.00817.26
7.1.230.0020.01117.32
7.1.220.0080.00717.29
7.1.210.0080.00817.29
7.1.200.0050.00616.72
7.1.190.0050.00817.35
7.1.180.0070.00817.25
7.1.170.0050.00817.24
7.1.160.0090.00817.26
7.1.150.0030.01017.12
7.1.140.0030.01017.26
7.1.130.0040.00917.23
7.1.120.0020.00917.18
7.1.110.0070.00717.15
7.1.100.0070.00617.48
7.1.90.0070.00717.35
7.1.80.0030.01117.26
7.1.70.0050.00617.21
7.1.60.0080.01017.99
7.1.50.0090.01017.24
7.1.40.0090.00517.33
7.1.30.0100.00617.32
7.1.20.0070.00917.31
7.1.10.0080.00517.32
7.1.00.0060.03218.95
7.0.330.0070.00517.11
7.0.320.0050.00816.90
7.0.310.0050.00517.15
7.0.300.0040.00717.04
7.0.290.0080.00517.02
7.0.280.0040.00817.05
7.0.270.0020.01016.98
7.0.260.0070.00516.98
7.0.250.0080.00517.15
7.0.240.0060.00517.07
7.0.230.0060.00517.16
7.0.220.0090.00316.99
7.0.210.0050.00917.04
7.0.200.0050.00716.92
7.0.190.0030.01117.02
7.0.180.0050.00916.96
7.0.170.0040.01117.06
7.0.160.0070.00517.10
7.0.150.0020.01117.11
7.0.140.0040.02918.73
7.0.130.0040.00416.85
7.0.120.0080.00817.05
7.0.110.0110.00516.85
7.0.100.0050.00916.81
7.0.90.0030.01016.89
7.0.80.0050.00617.05
7.0.70.0030.00817.10
7.0.60.0060.02017.94
7.0.50.0050.01817.32
7.0.40.0040.03416.60
7.0.30.0140.02816.73
7.0.20.0120.01616.77
7.0.10.0070.03316.80
7.0.00.0050.02816.71
5.6.400.0080.00716.03
5.6.390.0070.00815.90
5.6.380.0090.00515.95
5.6.370.0060.00815.73
5.6.360.0060.01015.87
5.6.350.0070.00815.80
5.6.340.0060.00615.99
5.6.330.0080.00516.00
5.6.320.0030.00916.01
5.6.310.0020.01115.91
5.6.300.0030.00915.81
5.6.290.0090.00615.77
5.6.280.0070.02617.51
5.6.270.0100.00716.00
5.6.260.0060.01015.87
5.6.250.0050.01116.07
5.6.240.0090.00715.99
5.6.230.0090.00615.98
5.6.220.0070.00715.74
5.6.210.0080.02717.39
5.6.200.0030.03516.68
5.6.190.0020.03517.42
5.6.180.0120.02017.46
5.6.170.0120.02117.41
5.6.160.0030.02217.46
5.6.150.0050.03416.71
5.6.140.0060.03416.62
5.6.130.0090.02016.73
5.6.120.0080.03017.81
5.6.110.0060.01917.68
5.6.100.0110.03217.50
5.6.90.0100.03117.51
5.6.80.0050.01817.37
5.6.70.1400.01617.34
5.6.60.0010.01115.90
5.6.50.0050.01115.97
5.6.40.0100.00315.83
5.6.30.0050.01015.81
5.6.20.0040.01115.83
5.6.10.0070.00715.98
5.6.00.0000.01415.85
5.5.380.0060.00715.99
5.5.370.0070.00515.79
5.5.360.0050.00616.03
5.5.350.0180.02317.32
5.5.340.0080.02916.53
5.5.330.0040.03017.25
5.5.320.0190.02617.31
5.5.310.0080.02317.32
5.5.300.0040.02316.65
5.5.290.0110.02916.65
5.5.280.0060.02217.61
5.5.270.0070.02017.54
5.5.260.0080.01617.58
5.5.250.0070.02917.45
5.5.240.1390.01917.36
5.5.230.0080.00515.73
5.5.220.0060.00615.84
5.5.210.0020.01415.72
5.5.200.0050.00815.89
5.5.190.0080.00515.73
5.5.180.0100.00315.79
5.5.170.0040.00915.60
5.5.160.0040.01115.89
5.5.150.0050.00815.65
5.5.140.0050.01015.73
5.5.130.0100.00315.85
5.5.120.0070.00515.66
5.5.110.0020.01415.79
5.5.100.0070.00715.79
5.5.90.0050.00915.67
5.5.80.0060.00515.67
5.5.70.0030.00815.61
5.5.60.0060.00815.81
5.5.50.0090.00315.82
5.5.40.0070.00515.76
5.5.30.0000.01415.53
5.5.20.0060.00615.69
5.5.10.0020.00815.80
5.5.00.0080.00715.80
5.4.450.0170.02315.01
5.4.440.0200.02915.02
5.4.430.0340.02315.06
5.4.420.0290.02215.06
5.4.410.0300.02314.84
5.4.400.0290.02214.98
5.4.390.0290.02714.92
5.4.380.0300.02314.86
5.4.370.0280.02314.68
5.4.360.0330.02414.80
5.4.350.0280.02114.96
5.4.340.0070.01412.35
5.4.330.0060.00412.74
5.4.320.0040.01912.65
5.4.310.0050.01612.65
5.4.300.0070.01412.60
5.4.290.0050.02012.72
5.4.280.0060.01512.57
5.4.270.0030.01612.69
5.4.260.0040.01712.55
5.4.250.0030.01812.65
5.4.240.0050.01512.54
5.4.230.0040.01512.61
5.4.220.0040.01612.56
5.4.210.0040.01812.58
5.4.200.0040.01612.53
5.4.190.0050.01612.58
5.4.180.0050.01512.57
5.4.170.0030.01712.52
5.4.160.0080.01512.51
5.4.150.0030.01912.50
5.4.140.0070.01712.57
5.4.130.0040.01612.59
5.4.120.0030.01512.58
5.4.110.0040.01412.52
5.4.100.0060.01412.39
5.4.90.0040.01712.53
5.4.80.0050.01812.53
5.4.70.0040.01612.49
5.4.60.0070.01412.46
5.4.50.0050.01612.55
5.4.40.0030.01612.43
5.4.30.0040.01612.54
5.4.20.0080.01312.51
5.4.10.0030.01612.52
5.4.00.0050.01512.35
5.3.290.0070.03812.80
5.3.280.0090.04212.70
5.3.270.0060.03912.72
5.3.260.0070.03912.72
5.3.250.0060.03612.72
5.3.240.0050.03712.72
5.3.230.0090.03412.71
5.3.220.0030.03912.68
5.3.210.0040.04012.68
5.3.200.0060.03812.68
5.3.190.0100.04212.68
5.3.180.0060.03912.67
5.3.170.0050.04212.67
5.3.160.0090.03312.68
5.3.150.0080.03612.67
5.3.140.0070.03612.66
5.3.130.0060.04012.66
5.3.120.0080.04112.66
5.3.110.0070.03912.66
5.3.100.0060.04312.12
5.3.90.0060.04712.11
5.3.80.0070.03612.10
5.3.70.0080.03512.10
5.3.60.0060.03912.08
5.3.50.0070.03612.03
5.3.40.0080.03512.03
5.3.30.0080.03712.00
5.3.20.0090.03411.77
5.3.10.0030.03911.73
5.3.00.0060.03811.72
5.2.170.0070.0299.22
5.2.160.0040.0299.22
5.2.150.0050.0309.23
5.2.140.0030.0329.22
5.2.130.0060.0289.18
5.2.120.0040.0289.18
5.2.110.0040.0309.19
5.2.100.0020.0319.18
5.2.90.0030.0309.18
5.2.80.0060.0299.17
5.2.70.0030.0389.18
5.2.60.0050.0329.13
5.2.50.0060.0299.10
5.2.40.0050.0289.07
5.2.30.0040.0309.05
5.2.20.0080.0289.04
5.2.10.0050.0298.95
5.2.00.0060.0288.80
5.1.60.0060.0238.09
5.1.50.0050.0248.09
5.1.40.0010.0308.07
5.1.30.0050.0268.42
5.1.20.0040.0268.44
5.1.10.0050.0248.16
5.1.00.0040.0298.17
5.0.50.0030.0216.64
5.0.40.0030.0196.50
5.0.30.0050.0296.32
5.0.20.0030.0206.28
5.0.10.0030.0206.26
5.0.00.0040.0306.25
4.4.90.0020.0204.78
4.4.80.0030.0144.75
4.4.70.0040.0144.75
4.4.60.0030.0154.76
4.4.50.0010.0174.77
4.4.40.0060.0244.71
4.4.30.0060.0124.75
4.4.20.0040.0144.84
4.4.10.0010.0184.85
4.4.00.0040.0264.76
4.3.110.0030.0164.66
4.3.100.0030.0164.66
4.3.90.0050.0174.64
4.3.80.0020.0264.59
4.3.70.0030.0214.63
4.3.60.0030.0214.63
4.3.50.0020.0194.63
4.3.40.0030.0324.54
4.3.30.0040.0183.30
4.3.20.0020.0163.28
4.3.10.0010.0173.23
4.3.00.0130.0276.99

preferences:
40.24 ms | 401 KiB | 5 Q