3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo1() { echo 1; } $foo1 = 'foo1'; $foo1(); $foo2 = function () { echo 2; }; $foo2(); class Three { public function __invoke() { echo 3; } } $foo3 = new Three(); $foo3(); class Bar { static function foo4() { echo 4;} function foo5() { echo 5; } static function foo6() { echo 6;} } $foo3 = array('Bar','foo4'); $foo3(); // we should make this work $foo4 = array(new Bar, 'foo5'); $foo4(); // we should make this work $foo6 = [Bar::class, 'foo6']; $foo6();

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.0100.01016.49
8.3.50.0100.01016.33
8.3.40.0110.00718.67
8.3.30.0070.00718.67
8.3.20.0080.00018.62
8.3.10.0030.00620.66
8.3.00.0000.00919.38
8.2.180.0140.00416.61
8.2.170.0040.01122.96
8.2.160.0030.01021.03
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00319.95
8.2.110.0030.00721.06
8.2.100.0040.00717.91
8.2.90.0000.00819.18
8.2.80.0040.00418.05
8.2.70.0060.00317.50
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0060.00317.97
8.2.20.0000.00717.72
8.2.10.0000.00817.79
8.2.00.0070.00217.81
8.1.280.0210.00025.92
8.1.270.0050.00224.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.01020.83
8.1.230.0060.00620.96
8.1.220.0060.00317.79
8.1.210.0000.00818.91
8.1.200.0060.00317.36
8.1.190.0080.00017.30
8.1.180.0000.00818.10
8.1.170.0040.00418.89
8.1.160.0000.00718.94
8.1.150.0000.00718.50
8.1.140.0000.00817.40
8.1.130.0070.00017.74
8.1.120.0050.00217.51
8.1.110.0080.00017.42
8.1.100.0030.00517.36
8.1.90.0040.00417.49
8.1.80.0040.00417.31
8.1.70.0080.00017.49
8.1.60.0040.00417.47
8.1.50.0030.00617.48
8.1.40.0000.00717.51
8.1.30.0040.00417.57
8.1.20.0040.00417.63
8.1.10.0000.00817.53
8.1.00.0040.00417.53
8.0.300.0060.00319.91
8.0.290.0000.00716.75
8.0.280.0030.00318.35
8.0.270.0050.00317.27
8.0.260.0000.00716.71
8.0.250.0000.00716.98
8.0.240.0000.00816.92
8.0.230.0050.00216.92
8.0.220.0000.00716.78
8.0.210.0000.00716.93
8.0.200.0050.00316.86
8.0.190.0050.00316.84
8.0.180.0040.00416.80
8.0.170.0000.00816.86
8.0.160.0070.00016.93
8.0.150.0000.00816.82
8.0.140.0030.00516.85
8.0.130.0030.00313.27
8.0.120.0050.00316.70
8.0.110.0030.00316.97
8.0.100.0040.00416.75
8.0.90.0040.00416.82
8.0.80.0120.00316.82
8.0.70.0040.00417.00
8.0.60.0030.00616.78
8.0.50.0040.00416.83
8.0.30.0110.00817.04
8.0.20.0150.00716.86
8.0.10.0000.00816.88
8.0.00.0080.01116.86
7.4.330.0000.00513.00
7.4.320.0000.00616.49
7.4.300.0000.00616.51
7.4.290.0040.00516.51
7.4.280.0030.00616.50
7.4.270.0070.00016.55
7.4.260.0050.00013.28
7.4.250.0060.00316.48
7.4.240.0030.00316.36
7.4.230.0070.00016.66
7.4.220.0110.01116.56
7.4.210.0060.01016.54
7.4.200.0000.00716.58
7.4.190.0000.00716.45
7.4.160.0060.01116.44
7.4.150.0140.00416.38
7.4.140.0150.00216.50
7.4.130.0080.01016.47
7.4.120.0110.00816.57
7.4.110.0140.00316.42
7.4.100.0080.00816.43
7.4.90.0120.00616.62
7.4.80.0080.00816.53
7.4.70.0150.00616.45
7.4.60.0060.01616.50
7.4.50.0070.00016.42
7.4.40.0120.00416.56
7.4.30.0080.00816.49
7.4.10.0070.00714.73
7.4.00.0100.00715.03
7.3.330.0070.00013.30
7.3.320.0050.00013.29
7.3.310.0000.00716.19
7.3.300.0000.00716.16
7.3.290.0100.01016.26
7.3.280.0080.00816.27
7.3.270.0110.00716.38
7.3.260.0070.01116.44
7.3.250.0050.01216.37
7.3.240.0100.00616.36
7.3.230.0080.00816.47
7.3.210.0100.00716.32
7.3.200.0060.01319.39
7.3.190.0140.00316.57
7.3.180.0090.01316.58
7.3.170.0100.01016.44
7.3.160.0130.00316.46
7.3.130.0140.00314.93
7.3.120.0110.00814.96
7.3.110.0080.01114.71
7.3.100.0000.01714.80
7.3.90.0000.01314.61
7.3.80.0000.00814.55
7.3.70.0060.00614.60
7.3.60.0040.00414.54
7.3.50.0040.00814.62
7.3.40.0060.00614.73
7.3.30.0060.00614.82
7.3.20.0090.00616.68
7.3.10.0030.01016.54
7.3.00.0040.01116.45
7.2.330.0070.01316.57
7.2.320.0030.01416.61
7.2.310.0030.01816.39
7.2.300.0090.00916.61
7.2.290.0140.00316.78
7.2.260.0100.01014.79
7.2.250.0110.00715.29
7.2.240.0000.01514.98
7.2.230.0030.01214.91
7.2.220.0060.00615.13
7.2.210.0060.00315.09
7.2.200.0030.01014.80
7.2.190.0130.00015.07
7.2.180.0130.00314.84
7.2.170.0070.00715.14
7.2.160.0070.00715.26
7.2.150.0000.01116.96
7.2.140.0030.01316.64
7.2.130.0120.00016.84
7.2.120.0030.00916.86
7.2.110.0000.00917.11
7.2.100.0000.01516.96
7.2.90.0060.00616.74
7.2.80.0000.01016.81
7.2.70.0100.00316.92
7.2.60.0040.01217.14
7.2.50.0070.01117.00
7.2.40.0070.01116.93
7.2.30.0030.00717.03
7.2.20.0030.01217.10
7.2.10.0050.00516.86
7.2.00.0040.01018.00
7.1.330.0080.00815.81
7.1.320.0000.00915.79
7.1.310.0110.00415.44
7.1.300.0000.01415.73
7.1.290.0000.01215.62
7.1.280.0100.00315.46
7.1.270.0000.00915.70
7.1.260.0030.00615.61
7.1.250.0000.01515.82
7.1.240.0030.01315.52
7.1.230.0100.00615.83
7.1.220.0030.01015.54
7.1.210.0030.01015.64
7.1.200.0000.01615.46
7.1.190.0040.01115.56
7.1.180.0090.00615.70
7.1.170.0090.00615.55
7.1.160.0090.00315.72
7.1.150.0030.01115.43
7.1.140.0060.00915.68
7.1.130.0000.01415.55
7.1.120.0030.01315.54
7.1.110.0040.01115.74
7.1.100.0070.00816.71
7.1.90.0040.00815.76
7.1.80.0070.00715.65
7.1.70.0050.00416.47
7.1.60.0090.00917.44
7.1.50.0060.01216.33
7.1.40.0040.00815.91
7.1.30.0130.00315.61
7.1.20.0120.00315.56
7.1.10.0040.00415.45
7.1.00.0020.04519.14
7.0.330.0060.00615.20
7.0.320.0060.00615.08
7.0.310.0040.01115.05
7.0.300.0030.01415.39
7.0.290.0040.01115.32
7.0.280.0000.00915.11
7.0.270.0070.01015.22
7.0.260.0000.01815.28
7.0.250.0110.00415.56
7.0.240.0060.00615.31
7.0.230.0080.00015.14
7.0.220.0030.00615.47
7.0.210.0030.00715.21
7.0.200.0090.00415.96
7.0.190.0000.00815.41
7.0.180.0090.00615.39
7.0.170.0090.00615.23
7.0.160.0100.00615.36
7.0.150.0000.00915.41
7.0.140.0050.03818.61
7.0.130.0030.01315.02
7.0.120.0020.04018.70
7.0.110.0060.00615.27
7.0.100.0050.00515.24
7.0.90.0000.00815.30
7.0.80.0000.01115.41
7.0.70.0000.01115.11
7.0.60.0100.04217.66
7.0.50.0040.02916.64
7.0.40.0080.04516.58
7.0.30.0180.03616.82
7.0.20.0180.03516.68
7.0.10.0130.03216.83
7.0.00.0090.02116.74
5.6.400.0030.01314.03
5.6.390.0070.00414.38
5.6.380.0030.00914.54
5.6.370.0030.00614.60
5.6.360.0090.00614.13
5.6.350.0000.01414.47
5.6.340.0060.00614.53
5.6.330.0110.00014.59
5.6.320.0060.00714.40
5.6.310.0030.01014.34
5.6.300.0100.00714.26
5.6.290.0080.00414.45
5.6.280.0090.03317.71
5.6.270.0000.01314.20
5.6.260.0030.00614.37
5.6.250.0060.00814.42
5.6.240.0060.00314.18
5.6.230.0070.00314.26
5.6.220.0060.00614.34
5.6.210.0030.03317.34
5.6.200.0050.04516.18
5.6.190.0080.03317.42
5.6.180.0160.02317.48
5.6.170.0150.03017.39
5.6.160.0050.04717.42
5.6.150.0060.02516.15
5.6.140.0070.02216.26
5.6.130.0080.02116.16
5.6.120.0030.03617.64
5.6.110.0050.03717.73
5.6.100.0050.03017.63
5.6.90.0100.04117.63
5.6.80.0050.02317.23
5.6.70.0150.03717.23
5.6.60.0060.00914.52
5.6.50.0040.00414.11
5.6.40.0120.00014.09
5.6.30.0030.01014.33
5.6.20.0110.00014.33
5.6.10.0030.01414.13
5.6.00.0090.00614.21
5.5.380.0050.00513.95
5.5.370.0070.00714.48
5.5.360.0030.00614.64
5.5.350.0130.02417.17
5.5.340.0050.04316.17
5.5.330.0050.02717.35
5.5.320.0080.04317.48
5.5.310.0170.03717.24
5.5.300.0070.03216.12
5.5.290.0080.03816.19
5.5.280.0160.03817.46
5.5.270.0050.04017.52
5.5.260.0070.04217.33
5.5.250.0140.03817.30
5.5.240.0020.04617.13
5.5.230.0040.01214.02
5.5.220.0030.01014.00
5.5.210.0040.01114.26
5.5.200.0060.00614.33
5.5.190.0070.00414.01
5.5.180.0050.00514.47
5.5.170.0040.01213.93
5.5.160.0120.00313.95
5.5.150.0040.00814.08
5.5.140.0070.00714.10
5.5.130.0110.00414.00
5.5.120.0090.00614.38
5.5.110.0100.00014.05
5.5.100.0030.01014.27
5.5.90.0080.00314.25
5.5.80.0000.01314.28
5.5.70.0000.01214.21
5.5.60.0060.00914.02
5.5.50.0060.00614.00
5.5.40.0040.00714.01
5.5.30.0080.00514.29
5.5.20.0030.00613.70
5.5.10.0030.00614.29
5.5.00.0070.00714.04
5.4.450.0050.02315.08
5.4.440.0070.04315.02
5.4.430.0080.03315.04
5.4.420.0090.03315.17
5.4.410.0050.02614.88
5.4.400.0050.02515.10
5.4.390.0040.04415.04
5.4.380.0020.03114.88
5.4.370.0130.03314.87
5.4.360.0070.03814.85
5.4.350.0050.04215.01
5.4.340.0040.04414.90
5.4.330.0060.00310.68
5.4.320.0050.02214.96
5.4.310.0080.03814.96
5.4.300.0060.03514.89
5.4.290.0050.03114.93
5.4.280.0080.03714.98
5.4.270.0080.03814.99
5.4.260.0090.02614.73
5.4.250.0080.02815.14
5.4.240.0070.03614.93
5.4.230.0070.04515.11
5.4.220.0090.04215.04
5.4.210.0070.03514.90
5.4.200.0050.02814.98
5.4.190.0070.03714.80
5.4.180.0050.03514.89
5.4.170.0060.04314.70
5.4.160.0100.02814.99
5.4.150.0080.03914.85
5.4.140.0040.02213.53
5.4.130.0050.04113.65
5.4.120.0050.02813.66
5.4.110.0080.03613.57
5.4.100.0070.04013.68
5.4.90.0050.02513.51
5.4.80.0030.03113.51
5.4.70.0050.03613.88
5.4.60.0040.03413.48
5.4.50.0110.03513.57
5.4.40.0050.04013.69
5.4.30.0020.02913.58
5.4.20.0030.03613.68
5.4.10.0070.03513.62
5.4.00.0100.03513.32
5.3.290.0080.03712.49
5.3.280.0090.03712.38
5.3.270.0050.02812.50
5.3.260.0070.03812.47
5.3.250.0020.04612.57
5.3.240.0070.03912.36
5.3.230.0060.04112.41
5.3.220.0060.04012.48
5.3.210.0060.04112.28
5.3.200.0050.02612.42
5.3.190.0080.03312.48
5.3.180.0030.03912.50
5.3.170.0070.03912.59
5.3.160.0060.03612.43
5.3.150.0020.02812.40
5.3.140.0050.04312.47
5.3.130.0010.03412.52
5.3.120.0040.04212.37
5.3.110.0090.02512.35
5.3.100.0070.02112.22
5.3.90.0080.03312.20
5.3.80.0050.02212.14
5.3.70.0070.03812.18
5.3.60.0050.02912.13
5.3.50.0030.04112.03
5.3.40.0030.04212.21
5.3.30.0050.04111.93
5.3.20.0050.03711.95
5.3.10.0050.02111.86
5.3.00.0030.02511.87
5.2.170.0070.06011.14
5.2.160.0000.06011.29
5.2.150.0000.04311.18
5.2.140.0070.05311.15
5.2.130.0130.04311.06
5.2.120.0030.06311.27
5.2.110.0000.03311.26
5.2.100.0070.04710.99
5.2.90.0070.06011.11
5.2.80.0070.04711.10
5.2.70.0100.04711.01
5.2.60.0030.03711.09
5.2.50.0130.04311.02
5.2.40.0000.04010.99
5.2.30.0000.04710.98
5.2.20.0100.05011.00
5.2.10.0030.04310.81
5.2.00.0030.05710.68
5.1.60.0070.04310.05
5.1.50.0070.05710.14
5.1.40.0030.0309.94
5.1.30.0070.04710.48
5.1.20.0030.05710.38
5.1.10.0070.05010.06
5.1.00.0130.04710.04
5.0.50.0070.0408.58
5.0.40.0070.0178.42
5.0.30.0000.0338.37
5.0.20.0030.0308.27
5.0.10.0030.0338.32
5.0.00.0030.0478.12
4.4.90.0000.0208.01
4.4.80.0000.0408.01
4.4.70.0000.0378.01
4.4.60.0030.0308.01
4.4.50.0000.0378.01
4.4.40.0000.0408.01
4.4.30.0000.0438.01
4.4.20.0000.0278.01
4.4.10.0000.0278.01
4.4.00.0030.0578.01
4.3.110.0030.0178.01
4.3.100.0130.0178.01
4.3.90.0100.0278.01
4.3.80.0030.0338.01
4.3.70.0100.0308.01
4.3.60.0030.0308.01
4.3.50.0000.0338.01
4.3.40.0030.0538.01
4.3.30.0070.0138.01
4.3.20.0030.0338.01
4.3.10.0000.0238.01
4.3.00.0030.0338.01

preferences:
46.19 ms | 400 KiB | 5 Q