3v4l.org

run code in 300+ PHP versions simultaneously
<?php class My_Class { const CLASS_CONSTANT = 'test value'; public static function my_function() { $lambda_function = function() { echo self::CLASS_CONSTANT; }; $lambda_function(); } public function start() { self::my_function(); } } $obj = new My_Class; $obj->start();

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.0110.00318.18
8.3.50.0100.01121.94
8.3.40.0070.00718.59
8.3.30.0100.01019.09
8.3.20.0000.00820.18
8.3.10.0050.00321.77
8.3.00.0000.00819.07
8.2.180.0100.01018.09
8.2.170.0000.01422.96
8.2.160.0070.00722.06
8.2.150.0000.00924.18
8.2.140.0000.00924.66
8.2.130.0080.00026.16
8.2.120.0000.00819.66
8.2.110.0130.01018.99
8.2.100.0070.00417.72
8.2.90.0060.00318.09
8.2.80.0030.00517.97
8.2.70.0080.00017.93
8.2.60.0050.00317.98
8.2.50.0000.00818.10
8.2.40.0000.00919.25
8.2.30.0080.00019.13
8.2.20.0040.00417.64
8.2.10.0040.00418.11
8.2.00.0000.00817.68
8.1.280.0060.00925.92
8.1.270.0080.00018.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.01022.50
8.1.230.0040.00720.92
8.1.220.0080.00017.76
8.1.210.0050.00318.90
8.1.200.0040.00417.35
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0080.00018.50
8.1.160.0080.00018.89
8.1.150.0050.00218.77
8.1.140.0040.00417.36
8.1.130.0070.00017.88
8.1.120.0000.00717.46
8.1.110.0000.00717.46
8.1.100.0020.00517.51
8.1.90.0030.00417.52
8.1.80.0000.00717.44
8.1.70.0000.00717.41
8.1.60.0070.00417.57
8.1.50.0080.00017.51
8.1.40.0000.00717.56
8.1.30.0000.00817.55
8.1.20.0050.00217.62
8.1.10.0070.00017.47
8.1.00.0000.00817.48
8.0.300.0070.00020.04
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0030.00317.32
8.0.260.0060.00017.25
8.0.250.0030.00316.98
8.0.240.0050.00316.93
8.0.230.0030.00316.96
8.0.220.0040.00416.76
8.0.210.0000.00716.88
8.0.200.0030.00316.78
8.0.190.0040.00416.91
8.0.180.0000.00716.90
8.0.170.0000.00716.80
8.0.160.0040.00416.90
8.0.150.0050.00216.73
8.0.140.0000.00816.88
8.0.130.0060.00013.28
8.0.120.0050.00316.75
8.0.110.0040.00416.81
8.0.100.0020.00516.84
8.0.90.0000.00817.01
8.0.80.0000.01516.87
8.0.70.0020.00516.88
8.0.60.0040.00416.79
8.0.50.0040.00416.76
8.0.30.0100.01017.10
8.0.20.0120.00717.40
8.0.10.0000.00716.93
8.0.00.0110.01016.76
7.4.330.0060.00015.14
7.4.320.0030.00316.55
7.4.300.0030.00316.61
7.4.290.0100.00016.49
7.4.280.0060.00316.50
7.4.270.0030.00316.53
7.4.260.0060.00316.60
7.4.250.0040.00416.46
7.4.240.0020.00516.43
7.4.230.0000.00716.35
7.4.220.0210.00616.60
7.4.210.0030.01016.61
7.4.200.0000.00816.67
7.4.160.0100.01016.73
7.4.150.0100.00617.40
7.4.140.0050.01217.86
7.4.130.0100.00716.55
7.4.120.0120.00716.56
7.4.110.0150.00916.43
7.4.100.0130.00616.55
7.4.90.0060.01016.43
7.4.80.0170.00419.39
7.4.70.0090.01316.71
7.4.60.0040.01316.52
7.4.50.0050.00316.42
7.4.40.0110.00616.42
7.4.30.0160.00616.41
7.4.00.0080.00614.87
7.3.330.0000.00513.11
7.3.320.0030.00313.16
7.3.310.0070.00016.34
7.3.300.0000.00716.34
7.3.290.0070.00716.25
7.3.280.0090.00816.30
7.3.270.0130.01017.40
7.3.260.0030.01916.43
7.3.250.0200.00516.38
7.3.240.0130.00416.27
7.3.230.0130.01016.39
7.3.210.0030.01316.38
7.3.200.0090.00919.39
7.3.190.0170.00016.53
7.3.180.0090.00616.45
7.3.170.0090.00916.27
7.3.160.0130.00716.36
7.3.120.0060.01314.53
7.3.110.0070.01014.37
7.3.100.0090.00614.67
7.3.90.0030.01114.77
7.3.80.0040.00715.02
7.3.70.0120.00314.55
7.3.60.0060.00314.64
7.3.50.0060.00314.99
7.3.40.0040.00714.50
7.3.30.0000.00914.83
7.3.20.0070.00716.66
7.3.10.0060.00616.56
7.3.00.0070.00716.78
7.2.330.0050.01116.42
7.2.320.0030.01416.74
7.2.310.0070.01416.79
7.2.300.0090.00916.41
7.2.290.0100.00716.72
7.2.250.0120.00614.92
7.2.240.0130.00715.09
7.2.230.0000.01914.99
7.2.220.0040.01115.08
7.2.210.0060.00615.29
7.2.200.0000.01515.03
7.2.190.0000.01314.79
7.2.180.0070.00714.95
7.2.170.0080.00415.21
7.2.00.0000.01219.07
7.1.330.0070.00715.53
7.1.320.0060.00915.77
7.1.310.0080.00615.41
7.1.300.0070.00715.61
7.1.290.0040.01115.74
7.1.280.0080.00315.73
7.1.270.0000.00915.82
7.1.260.0000.01515.71
7.1.100.0100.00317.90
7.1.70.0060.00617.07
7.1.60.0070.01719.22
7.1.50.0170.01034.67
7.1.00.0070.07322.25
7.0.200.0070.00716.72
7.0.140.0030.04721.93
7.0.60.0100.06320.02
7.0.50.0100.07317.80
7.0.40.0070.04020.23
7.0.30.0270.08320.12
7.0.20.0270.04720.12
7.0.10.0100.08720.32
7.0.00.0100.05020.30
5.6.280.0100.06720.82
5.6.210.0070.06720.74
5.6.200.0070.05718.28
5.6.190.0070.05020.39
5.6.180.0330.07020.61
5.6.170.0230.06320.48
5.6.160.0000.04720.62
5.6.150.0000.08318.27
5.6.140.0100.04018.24
5.6.130.0070.06718.28
5.6.120.0100.08021.00
5.6.110.0030.05320.97
5.6.100.0100.06320.99
5.6.90.0070.05021.00
5.6.80.0170.07320.29
5.5.350.0100.04020.34
5.5.340.0070.05717.98
5.5.330.0030.07720.27
5.5.320.0270.08020.20
5.5.310.0230.04320.51
5.5.300.0130.08018.03
5.5.290.0130.08017.98
5.5.280.0070.07320.88
5.5.270.0030.05720.64
5.5.260.0130.07720.88
5.5.250.0130.07020.78
5.5.240.0030.08320.29
5.4.450.0130.06719.59
5.4.440.0670.07019.47
5.4.430.1270.04719.61
5.4.420.0800.06319.57
5.4.410.0700.05019.45
5.4.400.0530.06719.00
5.4.390.0800.06319.01
5.4.380.0370.04018.77
5.4.370.0230.07018.63
5.4.360.0200.06018.63
5.4.350.0230.06718.76
5.4.340.0130.05318.83
5.4.320.0230.05718.67
5.4.310.0200.05718.73
5.4.300.0200.06718.74
5.4.290.0170.05318.55
5.4.280.0070.06318.73
5.4.270.0130.05718.52
5.4.260.0200.05018.75
5.4.250.0300.05318.77
5.4.240.0230.04718.73
5.4.230.0100.06018.77
5.4.220.0170.05318.75
5.4.210.0100.06018.61
5.4.200.0400.05316.63
5.4.190.0200.05018.51
5.4.180.0200.05018.52
5.4.170.0170.05718.57
5.4.160.0230.05018.74
5.4.150.0230.05018.66
5.4.140.0130.05716.30
5.4.130.0270.04016.17
5.4.120.0200.05016.46
5.4.110.0170.05016.37
5.4.100.0100.05716.26
5.4.90.0230.04716.25
5.4.80.0170.05016.25
5.4.70.0200.04316.27
5.4.60.0100.05716.33
5.4.50.0130.05316.25
5.4.40.0130.05716.36
5.4.30.0230.04316.20
5.4.20.0130.05316.39
5.4.10.0130.05316.25
5.4.00.0170.05015.78
5.3.290.0200.05714.69
5.3.280.0330.04314.61
5.3.270.0130.07014.65
5.3.260.0230.05014.77
5.3.250.0030.07014.61
5.3.240.0300.04314.59
5.3.230.0200.05314.81
5.3.220.0270.04314.79
5.3.210.0170.05714.74
5.3.200.0130.07014.62
5.3.190.0170.05714.70
5.3.180.0270.04714.76
5.3.170.0200.05014.77
5.3.160.0200.07014.62
5.3.150.0170.05314.69
5.3.140.0270.04014.69
5.3.130.0100.06014.54
5.3.120.0200.05314.59
5.3.110.0230.05314.58
5.3.100.0200.05014.17
5.3.90.0070.07014.05
5.3.80.0130.05714.13
5.3.70.0200.05314.13
5.3.60.0130.05714.05
5.3.50.0230.04714.18
5.3.40.0270.04314.04
5.3.30.0230.05013.94
5.3.20.0270.04713.65
5.3.10.0170.05013.78
5.3.00.0170.05013.67
5.2.170.0200.03311.34
5.2.160.0170.03711.14
5.2.150.0100.04711.36
5.2.140.0200.03311.13
5.2.130.0070.05011.23
5.2.120.0230.03011.17
5.2.110.0100.04311.32
5.2.100.0200.03311.16
5.2.90.0170.03711.18
5.2.80.0170.03711.09
5.2.70.0070.05011.30
5.2.60.0200.03311.07
5.2.50.0200.03711.14
5.2.40.0130.04311.04
5.2.30.0230.03311.01
5.2.20.0130.03710.95
5.2.10.0170.03310.89
5.2.00.0070.04310.77
5.1.60.0130.03010.11
5.1.50.0170.03010.04
5.1.40.0270.02710.00
5.1.30.0200.03310.32
5.1.20.0100.04010.35
5.1.10.0130.03310.09
5.1.00.0130.03310.14
5.0.50.0070.0309.48
5.0.40.0030.0309.48
5.0.30.0070.0439.48
5.0.20.0100.0279.48
5.0.10.0130.0239.48
5.0.00.0030.0479.48
4.4.90.0100.0209.48
4.4.80.0100.0179.48
4.4.70.0070.0239.48
4.4.60.0070.0239.48
4.4.50.0070.0209.48
4.4.40.0070.0339.48
4.4.30.0070.0209.48
4.4.20.0000.0309.48
4.4.10.0070.0239.48
4.4.00.0070.0339.48
4.3.110.0170.0139.48
4.3.100.0030.0239.48
4.3.90.0030.0239.48
4.3.80.0070.0339.48
4.3.70.0070.0209.48
4.3.60.0030.0239.48
4.3.50.0070.0239.48
4.3.40.0030.0379.48
4.3.30.0000.0279.48
4.3.20.0070.0209.48
4.3.10.0100.0139.48
4.3.00.0030.0237.60

preferences:
52.06 ms | 401 KiB | 5 Q