3v4l.org

run code in 300+ PHP versions simultaneously
<?php class My_Class { const CLASS_CONSTANT = 'test value'; private function my_function() { $lambda_function = function() { echo self::CLASS_CONSTANT; }; $lambda_function(); } public function start() { $this->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.4.20.0150.00617.76
8.4.10.0140.00717.75
8.3.150.0140.00417.17
8.3.140.0150.00319.02
8.3.130.0000.00816.34
8.3.120.0160.00018.71
8.3.110.0170.00320.94
8.3.100.0080.01224.06
8.3.90.0050.00326.77
8.3.80.0030.00616.63
8.3.70.0110.00418.43
8.3.60.0100.00718.40
8.3.50.0080.01221.13
8.3.40.0030.01218.83
8.3.30.0100.00719.21
8.3.20.0040.00420.34
8.3.10.0040.00423.29
8.3.00.0050.00319.26
8.2.270.0160.00316.54
8.2.260.0120.00616.72
8.2.250.0040.00416.59
8.2.240.0040.00419.13
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0120.00016.35
8.2.190.0110.00416.58
8.2.180.0090.01218.24
8.2.170.0100.00722.96
8.2.160.0100.00319.47
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00422.23
8.2.110.0080.00721.02
8.2.100.0040.00818.09
8.2.90.0040.00419.27
8.2.80.0050.00317.97
8.2.70.0030.00517.61
8.2.60.0070.00317.80
8.2.50.0000.00918.07
8.2.40.0040.00419.95
8.2.30.0040.00417.97
8.2.20.0040.00417.64
8.2.10.0000.00818.11
8.2.00.0040.00417.55
8.1.310.0150.00316.29
8.1.300.0060.00317.86
8.1.290.0030.00718.88
8.1.280.0140.00725.92
8.1.270.0080.00023.99
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0060.00322.65
8.1.230.0040.00719.48
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0090.00017.23
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0030.00518.48
8.1.160.0000.00722.06
8.1.150.0000.00718.84
8.1.140.0050.00317.44
8.1.130.0000.00717.46
8.1.120.0040.00417.48
8.1.110.0040.00417.41
8.1.100.0000.00717.36
8.1.90.0050.00317.35
8.1.80.0070.00017.52
8.1.70.0000.00617.33
8.1.60.0000.00717.63
8.1.50.0000.00817.56
8.1.40.0000.00817.38
8.1.30.0000.00917.70
8.1.20.0040.00417.68
8.1.10.0000.00717.52
8.1.00.0070.00017.52
8.0.300.0060.00318.77
8.0.290.0000.00716.75
8.0.280.0000.00718.39
8.0.270.0000.00716.82
8.0.260.0000.00716.82
8.0.250.0030.00316.92
8.0.240.0070.00016.92
8.0.230.0070.00016.84
8.0.220.0070.00016.78
8.0.210.0000.00816.90
8.0.200.0030.00316.85
8.0.190.0000.00817.00
8.0.180.0020.00516.89
8.0.170.0000.00716.96
8.0.160.0030.00316.88
8.0.150.0000.00716.80
8.0.140.0070.00016.82
8.0.130.0000.00513.28
8.0.120.0040.00416.79
8.0.110.0000.00716.79
8.0.100.0000.00716.85
8.0.90.0020.00516.89
8.0.80.0060.00916.83
8.0.70.0050.00216.88
8.0.60.0030.00616.86
8.0.50.0070.00016.89
8.0.30.0140.00516.96
8.0.20.0130.01017.21
8.0.10.0030.01717.04
8.0.00.0070.01016.85
7.4.330.0000.00415.02
7.4.320.0000.00616.60
7.4.300.0060.00016.52
7.4.290.0070.00016.42
7.4.280.0080.00016.40
7.4.270.0030.00316.51
7.4.260.0030.00316.43
7.4.250.0000.00716.51
7.4.240.0000.00716.46
7.4.230.0000.00716.63
7.4.220.0160.00316.43
7.4.210.0000.01516.63
7.4.200.0070.00016.34
7.4.160.0050.01316.57
7.4.150.0090.00716.94
7.4.140.0150.00517.40
7.4.130.0110.00916.52
7.4.120.0050.01316.57
7.4.110.0110.00716.47
7.4.100.0080.00816.56
7.4.90.0100.00616.38
7.4.80.0070.01117.86
7.4.70.0140.00616.49
7.4.60.0060.00916.38
7.4.50.0030.00916.35
7.4.40.0070.01016.36
7.4.30.0090.00916.51
7.4.20.0040.01016.62
7.4.10.0080.00516.36
7.4.00.0120.00415.77
7.3.330.0020.00213.19
7.3.320.0000.00513.10
7.3.310.0050.00216.32
7.3.300.0030.00316.12
7.3.290.0090.00616.29
7.3.280.0060.01016.28
7.3.270.0060.01316.86
7.3.260.0090.00916.33
7.3.250.0130.00316.29
7.3.240.0070.01416.31
7.3.230.0080.01016.32
7.3.220.0090.00616.22
7.3.210.0100.00516.25
7.3.200.0110.00517.82
7.3.190.0080.01016.23
7.3.180.0070.01016.26
7.3.170.0080.00816.25
7.3.160.0110.00816.35
7.3.150.0110.00716.24
7.3.140.0060.00716.21
7.3.130.0070.00716.23
7.3.120.0070.01116.22
7.3.110.0050.00816.12
7.3.100.0090.00916.18
7.3.90.0090.00916.48
7.3.80.0040.01116.23
7.3.70.0090.00416.23
7.3.60.0060.01016.40
7.3.50.0090.00616.33
7.3.40.0110.00316.34
7.3.30.0090.00916.34
7.3.20.0060.00616.29
7.3.10.0080.00616.30
7.3.00.0090.00616.33
7.2.340.0210.00416.34
7.2.330.0140.00716.44
7.2.320.0150.00716.50
7.2.310.0150.00516.44
7.2.300.0110.01416.50
7.2.290.0120.01516.57
7.2.280.0150.01016.35
7.2.270.0160.00916.41
7.2.260.0220.00316.31
7.2.250.0080.01616.29
7.2.240.0100.01416.41
7.2.230.0110.01416.38
7.2.220.0170.01016.36
7.2.210.0170.00716.33
7.2.200.0130.01316.51
7.2.190.0250.00416.56
7.2.180.0150.00816.55
7.2.170.0110.01416.57
7.2.160.0190.00416.56
7.2.150.0250.00016.65
7.2.140.0220.00616.65
7.2.130.0250.00416.73
7.2.120.0240.00016.67
7.2.110.0140.01216.61
7.2.100.0070.01716.66
7.2.90.0240.00716.57
7.2.80.0280.00016.50
7.2.70.0140.01116.55
7.2.60.0530.00915.86
7.2.50.0620.00515.96
7.2.40.0940.00915.93
7.2.30.0700.00816.09
7.2.20.0860.00916.09
7.2.10.0610.00916.57
7.2.00.0490.01217.25
7.1.330.0220.00315.52
7.1.320.0270.01215.54
7.1.310.0190.00315.41
7.1.300.0110.01115.52
7.1.290.0200.00315.44
7.1.280.0170.00615.50
7.1.270.0140.00715.43
7.1.260.0190.00615.41
7.1.250.0210.00315.39
7.1.240.0160.00815.44
7.1.230.0260.00815.46
7.1.220.0320.00615.46
7.1.210.0190.00815.46
7.1.200.0130.00615.39
7.1.190.0160.00615.40
7.1.180.0180.00515.41
7.1.170.0570.01214.54
7.1.160.0880.00816.01
7.1.150.0710.01015.97
7.1.140.0710.01216.01
7.1.130.1100.00516.19
7.1.120.0600.01216.19
7.1.110.0540.01015.84
7.1.100.0470.00616.44
7.1.90.0430.01115.81
7.1.80.0630.00615.91
7.1.70.0480.01115.50
7.1.60.0510.01024.65
7.1.50.0480.01224.54
7.1.40.0530.01024.27
7.1.30.0510.01324.25
7.1.20.0470.01024.23
7.1.10.0350.00715.26
7.1.00.0310.01015.36
7.0.330.0170.00415.15
7.0.320.0130.01615.14
7.0.310.0170.00315.07
7.0.300.0800.00814.23
7.0.290.0790.00915.70
7.0.280.0230.00315.07
7.0.270.0600.01215.88
7.0.260.0750.01215.85
7.0.250.0620.00615.66
7.0.240.0620.00815.64
7.0.230.0550.00915.42
7.0.220.0610.01115.48
7.0.210.0580.01114.80
7.0.200.0490.00715.31
7.0.190.0390.01015.18
7.0.180.0430.00815.13
7.0.170.0420.00815.11
7.0.160.0380.01015.05
7.0.150.0380.01414.88
7.0.140.0960.00715.09
7.0.130.0390.00915.18
7.0.120.0460.00615.21
7.0.110.0460.00915.08
7.0.100.0230.00815.15
7.0.90.0360.00915.08
7.0.80.0350.00915.02
7.0.70.0320.01015.11
7.0.60.0290.00714.97
7.0.50.0360.00615.02
7.0.40.0350.00714.72
7.0.30.0330.01114.63
7.0.20.0260.00614.67
7.0.10.0270.00814.55
7.0.00.0340.00614.68
5.6.400.0170.00815.72
5.6.390.0160.00815.85
5.6.380.0190.01015.83
5.6.370.0150.00815.73
5.6.360.0120.01215.95
5.6.350.0220.00415.83
5.6.340.0070.01515.85
5.6.330.0200.00315.72
5.6.320.0140.01115.97
5.6.310.0110.01315.83
5.6.300.0140.04919.44
5.6.290.0140.04319.53
5.6.280.0150.04419.69
5.6.270.0180.04119.64
5.6.260.0100.04419.65
5.6.250.0120.04119.70
5.6.240.0120.04219.61
5.6.230.0150.05219.67
5.6.220.0140.04219.66
5.6.210.0130.05019.65
5.6.200.0120.04619.54
5.6.190.0160.04619.59
5.6.180.0120.04519.61
5.6.170.0120.04419.70
5.6.160.0140.04219.56
5.6.150.0110.04519.63
5.6.140.0150.04219.65
5.6.130.0160.03919.63
5.6.120.0140.04719.59
5.6.110.0120.04819.51
5.6.100.0140.04319.56
5.6.90.0120.04319.59
5.6.80.0100.04819.10
5.6.70.0110.05019.15
5.6.60.0100.05019.09
5.6.50.0120.04019.12
5.6.40.0160.04719.10
5.6.30.0130.04519.10
5.6.20.0090.04419.09
5.6.10.0130.04219.03
5.6.00.0130.04619.07
5.5.380.0120.05117.09
5.5.370.0110.04417.11
5.5.360.0160.04417.07
5.5.350.0080.04517.05
5.5.340.0120.05017.34
5.5.330.0120.04117.38
5.5.320.0130.03917.44
5.5.310.0110.04417.37
5.5.300.0130.04317.47
5.5.290.0140.04617.47
5.5.280.0150.03917.37
5.5.270.0140.04217.47
5.5.260.0100.04717.41
5.5.250.0140.04017.29
5.5.240.0150.04016.97
5.5.230.0160.03816.97
5.5.220.0080.04216.87
5.5.210.0120.05117.08
5.5.200.0150.04816.88
5.5.190.0110.04716.98
5.5.180.0090.04916.96
5.5.170.0180.00615.84
5.5.160.0130.03916.88
5.5.150.0090.04016.96
5.5.140.0100.04016.96
5.5.130.0110.03916.85
5.5.120.0130.03616.92
5.5.110.0130.05316.85
5.5.100.0130.04416.94
5.5.90.0070.04116.92
5.5.80.0100.03916.93
5.5.70.0130.04316.94
5.5.60.0090.04016.78
5.5.50.0130.03916.77
5.5.40.0110.04216.89
5.5.30.0100.04416.84
5.5.20.0070.04416.83
5.5.10.0090.04416.89
5.5.00.0110.04416.78
5.4.450.0130.04017.70
5.4.440.0080.04917.68
5.4.430.0130.04417.78
5.4.420.0080.04317.67
5.4.410.0130.04317.46
5.4.400.0100.04317.40
5.4.390.0110.03917.50
5.4.380.0100.04317.34
5.4.370.0120.04017.41
5.4.360.0110.05417.42
5.4.350.0100.04517.45
5.4.340.0090.05417.36
5.4.330.0120.00612.57
5.4.320.0160.04117.50
5.4.310.0110.03617.46
5.4.300.0090.03717.42
5.4.290.0100.04417.44
5.4.280.0090.04017.52
5.4.270.0110.04117.52
5.4.260.0090.04717.52
5.4.250.0100.03817.41
5.4.240.0120.03817.40
5.4.230.0100.04217.41
5.4.220.0110.04017.35
5.4.210.0120.03417.41
5.4.200.0130.04117.43
5.4.190.0080.04217.44
5.4.180.0060.04317.39
5.4.170.0100.03917.46
5.4.160.0110.03417.44
5.4.150.0110.03917.46
5.4.140.0090.03815.59
5.4.130.0060.03915.60
5.4.120.0120.03415.64
5.4.110.0060.04315.63
5.4.100.0090.03715.63
5.4.90.0080.03715.68
5.4.80.0130.03515.71
5.4.70.0140.03815.62
5.4.60.0140.03915.67
5.4.50.0110.04115.59
5.4.40.0140.03415.60
5.4.30.0120.03915.64
5.4.20.0110.03615.59
5.4.10.0070.04215.61
5.4.00.0110.02214.72
5.3.290.0050.00413.90

preferences:
57.73 ms | 403 KiB | 5 Q