3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Will error on PHP <5.6 due to property declaration class Foo{ static $variable = array('func' => __CLASS__ . '::secondFunction'); public static function firstFunction(){ return "PHP 5.6!"; } public static function secondFunction(){ return "PHP 7!"; } } $variable = array('func' => 'firstFunction'); echo Foo::$variable['func']();

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.70.0110.00718.40
8.3.60.0040.01516.50
8.3.50.0180.00321.28
8.3.40.0070.00718.70
8.3.30.0100.01018.63
8.3.20.0000.00820.33
8.3.10.0000.00823.57
8.3.00.0040.00421.85
8.2.190.0060.00918.23
8.2.180.0100.00716.50
8.2.170.0130.00622.96
8.2.160.0100.00320.47
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0080.00020.94
8.2.120.0080.00026.35
8.2.110.0070.01119.00
8.2.100.0120.00018.03
8.2.90.0030.00619.41
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0080.00017.93
8.2.50.0000.00818.09
8.2.40.0000.00820.23
8.2.30.0080.00019.50
8.2.20.0040.00717.62
8.2.10.0070.00018.06
8.2.00.0020.00518.12
8.1.280.0080.00825.92
8.1.270.0110.00723.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00823.97
8.1.230.0000.01017.46
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0080.00317.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0050.00318.59
8.1.160.0000.00720.60
8.1.150.0040.00420.61
8.1.140.0030.00519.58
8.1.130.0070.00417.70
8.1.120.0040.00417.44
8.1.110.0060.00317.37
8.1.100.0080.00017.39
8.1.90.0040.00417.32
8.1.80.0000.00817.37
8.1.70.0070.00017.38
8.1.60.0060.00317.57
8.1.50.0060.00317.55
8.1.40.0000.00817.43
8.1.30.0000.00817.64
8.1.20.0040.00417.60
8.1.10.0070.00017.50
8.1.00.0030.00517.48
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.43
8.0.270.0000.00717.24
8.0.260.0000.00617.12
8.0.250.0050.00316.96
8.0.240.0030.00316.96
8.0.230.0030.00316.75
8.0.220.0000.00716.85
8.0.210.0040.00316.71
8.0.200.0000.00616.75
8.0.190.0000.00716.93
8.0.180.0000.00816.74
8.0.170.0040.00416.85
8.0.160.0000.00716.74
8.0.150.0030.00616.85
8.0.140.0000.00716.75
8.0.130.0030.00313.16
8.0.120.0040.00416.79
8.0.110.0040.00416.78
8.0.100.0040.00416.87
8.0.90.0050.00216.71
8.0.80.0150.00016.76
8.0.70.0080.00016.67
8.0.60.0000.00816.71
8.0.50.0040.00416.69
8.0.30.0080.01117.06
8.0.20.0110.00817.40
8.0.10.0050.00216.94
8.0.00.0090.01116.66
7.4.330.0050.00016.81
7.4.320.0040.00416.53
7.4.300.0000.00716.40
7.4.290.0030.00316.45
7.4.280.0040.00416.59
7.4.270.0030.00516.63
7.4.260.0070.00016.54
7.4.250.0000.00716.43
7.4.240.0000.00716.43
7.4.230.0070.00016.70
7.4.220.0000.01516.55
7.4.210.0030.01716.50
7.4.200.0030.00316.34
7.4.160.0160.00016.48
7.4.150.0170.00017.40
7.4.140.0090.01017.86
7.4.130.0080.01116.63
7.4.120.0040.01416.56
7.4.110.0080.00816.58
7.4.100.0160.00016.56
7.4.90.0060.01216.50
7.4.80.0060.01219.39
7.4.70.0070.01116.59
7.4.60.0030.01316.59
7.4.50.0080.00516.42
7.4.40.0090.00616.31
7.4.30.0100.01016.58
7.4.00.0050.01115.01
7.3.330.0060.00013.23
7.3.320.0000.00813.33
7.3.310.0000.00716.19
7.3.300.0000.00716.38
7.3.290.0060.00816.36
7.3.280.0050.01416.37
7.3.270.0060.01617.40
7.3.260.0110.00616.34
7.3.250.0140.00616.38
7.3.240.0080.01116.54
7.3.230.0070.01116.53
7.3.210.0070.01116.48
7.3.200.0090.00919.39
7.3.190.0100.00716.62
7.3.180.0090.00916.32
7.3.170.0160.00616.46
7.3.160.0110.00616.42
7.3.120.0040.01514.73
7.3.110.0070.01015.09
7.3.100.0100.00714.71
7.3.90.0080.00814.88
7.3.80.0000.00915.07
7.3.70.0090.00614.75
7.3.60.0030.00714.82
7.3.50.0000.01214.83
7.3.40.0040.00814.73
7.3.30.0060.01214.90
7.3.20.0040.00816.64
7.3.10.0030.00916.61
7.3.00.0080.00816.41
7.2.330.0130.00316.84
7.2.320.0110.00916.68
7.2.310.0100.00616.30
7.2.300.0140.00316.73
7.2.290.0070.01016.56
7.2.250.0040.01215.13
7.2.240.0170.00315.10
7.2.230.0090.00614.86
7.2.220.0040.01114.72
7.2.210.0000.01114.83
7.2.200.0080.00614.68
7.2.190.0000.01415.13
7.2.180.0110.00314.70
7.2.170.0000.01515.17
7.2.60.0300.01016.29
7.2.00.0070.00419.11
7.1.330.0100.00315.83
7.1.320.0060.00915.88
7.1.310.0070.00415.56
7.1.300.0030.01015.86
7.1.290.0100.00715.78
7.1.280.0100.00615.45
7.1.270.0040.00415.68
7.1.260.0030.00915.73
7.1.200.0100.00015.77
7.1.100.0000.00818.02
7.1.70.0020.00516.97
7.1.60.0110.00719.40
7.1.50.0030.01616.62
7.1.00.0100.07022.30
7.0.200.0200.00714.92
7.0.100.0170.05020.02
7.0.90.0200.06719.98
7.0.80.0170.06720.00
7.0.70.0300.05319.96
7.0.60.0130.05719.91
7.0.50.0270.07020.26
7.0.40.0100.07320.18
7.0.30.0100.08320.09
7.0.20.0070.07720.17
7.0.10.0100.08019.98
7.0.00.0000.07320.02
5.6.280.0100.06021.08
5.6.250.0030.05320.73
5.6.240.0130.06720.67
5.6.230.0070.05020.66
5.6.220.0100.04020.48
5.6.210.0070.05020.61
5.6.200.0070.08021.14
5.6.190.0030.08320.96
5.6.180.0130.08020.97
5.6.170.0070.06721.06
5.6.160.0070.05021.02
5.6.150.0070.09021.02
5.6.140.0070.07321.13
5.6.130.0100.07321.00
5.6.120.0100.06721.02
5.6.110.0200.07321.09
5.6.100.0070.08321.05
5.6.90.0130.08021.12
5.6.80.0100.03320.49
5.6.70.0000.04320.48
5.6.60.0170.07320.48
5.6.50.0100.08020.45
5.6.40.0030.06020.40
5.6.30.0100.04020.40
5.6.20.0030.05320.40
5.6.10.0030.09020.53
5.6.00.0070.07320.36
5.5.380.0130.04320.39
5.5.370.0130.05020.41
5.5.360.0100.08320.52
5.5.350.0130.07020.38
5.5.340.0070.08720.83
5.5.330.0070.08720.79
5.5.320.0030.04320.80
5.5.310.0070.07020.63
5.5.300.0070.08320.92
5.5.290.0000.09020.77
5.5.280.0070.08720.91
5.5.270.0070.04020.82
5.5.260.0070.10020.87
5.5.250.0030.04320.68
5.5.240.0100.08020.21
5.5.230.0070.04020.20
5.5.220.0130.06020.29
5.5.210.0100.03320.20
5.5.200.0100.07020.13
5.5.190.0030.07020.25
5.5.180.0100.07320.23
5.5.160.0070.04020.12
5.5.150.0100.04320.18
5.5.140.0070.03720.21
5.5.130.0070.03720.24
5.5.120.0000.08320.27
5.5.110.0070.05320.25
5.5.100.0000.08320.16
5.5.90.0030.07720.04
5.5.80.0030.08320.12
5.5.70.0100.07019.93
5.5.60.0000.07320.05
5.5.50.0200.05720.15
5.5.40.0170.06319.95
5.5.30.0000.06019.95
5.5.20.0070.07720.13
5.5.10.0030.04019.97
5.5.00.0070.03719.96

preferences:
61.25 ms | 401 KiB | 5 Q