3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class T {} } namespace { $hello = 42; class Test { public function first(string $str): Closure { return function() use ($str):int { return strlen($str); }; } public function second(int $i): int { } } $t = new Test; echo ($t->first("hello"))(); }

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.00716.38
8.3.50.0090.00616.34
8.3.40.0150.00018.61
8.3.30.0150.00018.61
8.3.20.0040.00420.24
8.3.10.0040.00421.69
8.3.00.0080.00023.48
8.2.180.0120.00318.25
8.2.170.0110.00419.04
8.2.160.0100.00322.96
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00721.04
8.2.110.0060.00322.12
8.2.100.0080.00417.80
8.2.90.0000.00819.17
8.2.80.0080.00018.05
8.2.70.0000.00917.50
8.2.60.0040.00418.05
8.2.50.0060.00618.07
8.2.40.0030.00622.27
8.2.30.0030.00520.51
8.2.20.0070.00017.59
8.2.10.0070.00018.11
8.2.00.0000.00718.10
8.1.280.0070.00725.92
8.1.270.0100.01020.40
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0110.00022.27
8.1.230.0080.00419.21
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0100.00017.13
8.1.190.0050.00317.22
8.1.180.0030.00618.10
8.1.170.0040.00418.66
8.1.160.0040.00420.76
8.1.150.0050.00318.93
8.1.140.0030.00619.46
8.1.130.0030.00317.62
8.1.120.0040.00417.51
8.1.110.0000.00817.50
8.1.100.0050.00217.46
8.1.90.0000.00717.51
8.1.80.0070.00017.47
8.1.70.0000.00717.37
8.1.60.0000.00717.55
8.1.50.0040.00417.42
8.1.40.0050.00317.51
8.1.30.0030.00617.68
8.1.20.0030.00617.62
8.1.10.0000.00817.44
8.1.00.0050.00217.54
8.0.300.0070.00018.77
8.0.290.0050.00216.63
8.0.280.0000.00818.45
8.0.270.0050.00317.21
8.0.260.0000.00717.26
8.0.250.0000.00816.98
8.0.240.0000.00816.85
8.0.230.0000.00717.04
8.0.220.0070.00016.93
8.0.210.0040.00416.91
8.0.200.0040.00417.02
8.0.190.0080.00417.01
8.0.180.0040.00416.96
8.0.170.0040.00416.95
8.0.160.0040.00416.82
8.0.150.0000.00816.86
8.0.140.0040.00416.75
8.0.130.0050.00013.38
8.0.120.0040.00416.73
8.0.110.0040.00416.94
8.0.100.0000.00816.76
8.0.90.0030.00516.75
8.0.80.0060.00816.94
8.0.70.0000.00716.79
8.0.60.0040.00416.70
8.0.50.0040.00416.72
8.0.30.0100.00716.83
8.0.20.0110.01017.40
8.0.10.0080.00016.96
8.0.00.0050.01216.72
7.4.330.0020.00216.78
7.4.320.0070.00016.55
7.4.300.0030.00316.54
7.4.290.0080.00016.49
7.4.280.0070.00016.48
7.4.270.0030.00316.46
7.4.260.0000.00716.45
7.4.250.0080.00016.59
7.4.240.0020.00516.57
7.4.230.0000.00716.49
7.4.220.0060.00916.54
7.4.210.0060.00916.63
7.4.200.0020.00516.35
7.4.160.0120.00416.53
7.4.150.0140.00517.40
7.4.140.0130.00517.86
7.4.130.0100.00816.38
7.4.120.0070.01016.56
7.4.110.0040.01416.63
7.4.100.0110.00716.60
7.4.90.0100.01016.45
7.4.80.0130.00919.39
7.4.70.0090.00616.52
7.4.60.0130.00316.40
7.4.50.0040.01116.43
7.4.40.0000.01716.40
7.4.30.0090.00916.48
7.4.00.0130.00514.77
7.3.330.0000.00513.14
7.3.320.0020.00313.32
7.3.310.0030.00416.41
7.3.300.0040.00416.31
7.3.290.0060.00916.32
7.3.280.0070.01216.41
7.3.270.0100.00717.40
7.3.260.0140.00316.48
7.3.250.0140.00716.44
7.3.240.0040.01316.35
7.3.230.0140.00316.54
7.3.210.0030.01316.30
7.3.200.0170.00416.50
7.3.190.0030.01216.39
7.3.180.0080.00816.37
7.3.170.0070.01016.27
7.3.160.0070.01416.68
7.3.120.0020.01414.97
7.3.110.0130.00614.68
7.3.100.0000.01514.77
7.3.90.0070.00715.01
7.3.80.0070.00414.72
7.3.70.0070.00414.79
7.3.60.0120.00314.89
7.3.50.0110.00014.71
7.3.40.0070.00714.79
7.3.30.0030.01314.57
7.3.20.0030.00716.63
7.3.10.0050.00316.67
7.3.00.0060.00616.62
7.2.330.0190.02316.45
7.2.320.0040.01916.49
7.2.310.0170.00316.77
7.2.300.0170.00016.72
7.2.290.0090.00916.82
7.2.250.0070.01315.31
7.2.240.0030.01014.99
7.2.230.0030.01015.08
7.2.220.0080.00815.04
7.2.210.0100.00315.10
7.2.200.0060.00915.11
7.2.190.0030.00815.02
7.2.180.0060.00615.02
7.2.170.0120.00315.08
7.2.160.0040.01214.86
7.2.150.0060.00617.10
7.2.140.0030.01417.05
7.2.130.0030.01317.02
7.2.120.0060.00617.04
7.2.110.0030.01017.10
7.2.100.0060.00916.96
7.2.90.0070.01017.03
7.2.80.0070.00716.98
7.2.70.0060.01017.07
7.2.60.0040.01117.09
7.2.50.0100.00316.99
7.2.40.0060.00916.87
7.2.30.0030.01316.69
7.2.20.0030.00716.92
7.2.10.0030.01416.70
7.2.00.0100.00518.15
7.1.330.0060.01215.86
7.1.320.0030.01216.02
7.1.310.0060.00315.73
7.1.300.0030.01015.63
7.1.290.0000.01115.77
7.1.280.0030.01015.89
7.1.270.0040.01115.74
7.1.260.0060.00915.71
7.1.250.0000.01515.81
7.1.240.0030.01015.43
7.1.230.0120.00015.58
7.1.220.0100.00715.65
7.1.210.0090.00315.48
7.1.200.0050.00815.86
7.1.190.0120.00315.71
7.1.180.0070.00715.80
7.1.170.0000.00815.80
7.1.160.0090.00615.69
7.1.150.0060.00715.57
7.1.140.0000.01215.77
7.1.130.0030.01015.79
7.1.120.0080.00315.81
7.1.110.0030.00715.66
7.1.100.0030.01316.90
7.1.90.0080.00415.65
7.1.80.0030.01015.92
7.1.70.0070.00516.45
7.1.60.0090.00917.69
7.1.50.0070.00516.42
7.1.40.0060.00915.68
7.1.30.0070.00715.78
7.1.20.0070.00715.73
7.1.10.0100.01015.84
7.1.00.0030.04519.04
7.0.330.0080.00315.36
7.0.320.0070.00715.48
7.0.310.0100.00315.13
7.0.300.0030.01015.45
7.0.290.0060.00315.35
7.0.280.0080.00615.31
7.0.270.0000.00815.06
7.0.260.0030.01115.20
7.0.250.0060.00615.55
7.0.240.0070.00715.43
7.0.230.0100.00315.46
7.0.220.0060.00915.43
7.0.210.0030.01015.53
7.0.200.0020.01016.10
7.0.190.0060.00915.44
7.0.180.0060.00615.30
7.0.170.0120.00315.41
7.0.160.0000.01415.38
7.0.150.0070.00715.38
7.0.140.0090.00615.27
7.0.130.0000.00915.48
7.0.120.0070.00715.32
7.0.110.0030.00915.27
7.0.100.0080.00815.58
7.0.90.0030.01315.22
7.0.80.0060.00615.26
7.0.70.0040.00815.04
7.0.60.0060.04717.68
7.0.50.0090.02016.55
7.0.40.0080.04316.93
7.0.30.0190.03616.95
7.0.20.0180.02616.74
7.0.10.0040.04716.67
7.0.00.0100.04716.81
5.6.400.0000.01214.22
5.6.390.0080.00814.24
5.6.380.0060.00914.28
5.6.370.0030.01014.11
5.6.360.0070.00314.10
5.6.350.0060.01013.96
5.6.340.0040.01114.32
5.6.330.0060.00614.46
5.6.320.0130.00314.22
5.6.310.0040.01114.19
5.6.300.0030.01314.34
5.6.290.0030.01013.97
5.6.280.0040.02817.62
5.6.270.0060.01214.14
5.6.260.0070.00714.13
5.6.250.0040.00913.98
5.6.240.0080.00814.13
5.6.230.0070.00714.18
5.6.220.0030.00714.33
5.6.210.0060.04317.27
5.6.200.0080.03916.03
5.6.190.0080.04217.14
5.6.180.0100.03217.11
5.6.170.0130.04217.28
5.6.160.0100.04117.23
5.6.150.0070.04316.25
5.6.140.0080.04216.23
5.6.130.0050.02316.24
5.6.120.0050.03817.49
5.6.110.0050.05017.57
5.6.100.0150.03617.59
5.6.90.0020.03917.38
5.6.80.0080.04517.25
5.6.70.0090.00314.16
5.6.60.0100.00614.01
5.6.50.0070.00713.83
5.6.40.0030.00713.90
5.6.30.0100.00614.12
5.6.20.0070.00414.00
5.6.10.0060.01013.84
5.6.00.0090.00914.05
5.5.380.0070.00414.23
5.5.370.0000.01314.13
5.5.360.0090.00614.17
5.5.350.0220.03017.09
5.5.340.0100.04015.92
5.5.330.0060.04317.19
5.5.320.0220.04217.30
5.5.310.0170.02717.18
5.5.300.0080.02715.99
5.5.290.0070.04216.16
5.5.280.0030.03017.27
5.5.270.0050.04817.38
5.5.260.0080.04017.29
5.5.250.0020.03217.23
5.5.240.0170.03517.13
5.5.230.0030.01014.16
5.5.220.0000.01614.28
5.5.210.0060.01014.07
5.5.200.0060.00613.81
5.5.190.0120.00313.99
5.5.180.0140.00014.05
5.5.170.0060.00614.06
5.5.160.0060.00914.29
5.5.150.0060.01213.93
5.5.140.0030.01313.75
5.5.130.0060.00813.75
5.5.120.0110.00713.86
5.5.110.0040.00414.21
5.5.100.0060.00614.00
5.5.90.0000.01314.09
5.5.80.0000.01514.10
5.5.70.0000.01513.57
5.5.60.0120.00314.04
5.5.50.0040.00814.12
5.5.40.0030.01213.87
5.5.30.0070.00713.91
5.5.20.0030.01013.84
5.5.10.0130.00014.11
5.5.00.0040.00713.98

preferences:
38.95 ms | 400 KiB | 5 Q