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): self { } } $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.0140.00716.38
8.3.50.0140.00521.09
8.3.40.0030.01718.79
8.3.30.0040.01118.66
8.3.20.0050.00220.39
8.3.10.0040.00421.91
8.3.00.0060.00323.57
8.2.180.0040.01118.41
8.2.170.0140.00022.96
8.2.160.0100.00320.43
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00421.00
8.2.120.0080.00026.35
8.2.110.0060.00621.11
8.2.100.0080.00417.78
8.2.90.0050.00319.19
8.2.80.0060.00317.97
8.2.70.0030.00517.50
8.2.60.0030.00617.93
8.2.50.0000.00818.10
8.2.40.0050.00322.34
8.2.30.0000.00720.63
8.2.20.0040.00417.66
8.2.10.0040.00418.21
8.2.00.0000.00718.16
8.1.280.0150.00425.92
8.1.270.0180.00020.43
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00322.62
8.1.230.0090.00317.70
8.1.220.0000.00817.91
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.22
8.1.180.0040.00418.10
8.1.170.0080.00018.65
8.1.160.0040.00420.77
8.1.150.0050.00218.89
8.1.140.0050.00319.64
8.1.130.0000.00817.70
8.1.120.0040.00417.43
8.1.110.0050.00317.41
8.1.100.0040.00417.38
8.1.90.0080.00017.40
8.1.80.0000.00717.48
8.1.70.0040.00417.48
8.1.60.0040.00417.46
8.1.50.0050.00317.51
8.1.40.0000.00817.46
8.1.30.0000.00817.70
8.1.20.0030.00617.65
8.1.10.0040.00417.48
8.1.00.0000.00717.44
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.36
8.0.270.0040.00417.27
8.0.260.0070.00017.27
8.0.250.0030.00616.96
8.0.240.0040.00416.93
8.0.230.0030.00316.94
8.0.220.0040.00416.83
8.0.210.0070.00016.87
8.0.200.0030.00316.96
8.0.190.0030.00616.84
8.0.180.0000.00716.92
8.0.170.0000.00816.81
8.0.160.0000.00716.88
8.0.150.0000.00716.79
8.0.140.0030.00516.82
8.0.130.0000.00513.30
8.0.120.0090.00016.89
8.0.110.0080.00016.80
8.0.100.0000.00716.94
8.0.90.0050.00316.79
8.0.80.0090.01216.87
8.0.70.0040.00416.73
8.0.60.0040.00416.76
8.0.50.0040.00416.76
8.0.30.0080.00816.98
8.0.20.0140.00517.40
8.0.10.0050.00316.96
8.0.00.0080.01316.76
7.4.330.0000.00516.79
7.4.320.0040.00416.59
7.4.300.0030.00316.53
7.4.290.0070.00016.40
7.4.280.0030.00516.59
7.4.270.0080.00016.60
7.4.260.0050.00316.47
7.4.250.0040.00416.57
7.4.240.0000.00716.57
7.4.230.0000.00716.71
7.4.220.0130.01016.51
7.4.210.0060.00916.43
7.4.200.0040.00416.55
7.4.160.0070.01416.59
7.4.150.0100.00717.40
7.4.140.0080.01217.86
7.4.130.0110.00716.55
7.4.120.0130.00416.42
7.4.110.0030.01416.58
7.4.100.0120.00916.48
7.4.90.0090.00916.66
7.4.80.0090.00619.39
7.4.70.0100.00616.40
7.4.60.0030.01316.66
7.4.50.0080.00716.37
7.4.40.0060.01016.45
7.4.30.0070.01016.51
7.4.00.0080.00914.86
7.3.330.0050.00013.38
7.3.320.0000.00513.22
7.3.310.0000.00716.39
7.3.300.0000.00716.22
7.3.290.0050.00916.39
7.3.280.0100.00816.37
7.3.270.0110.00917.40
7.3.260.0070.01416.49
7.3.250.0060.01216.39
7.3.240.0080.01216.56
7.3.230.0070.01016.39
7.3.210.0140.00616.21
7.3.200.0120.00916.46
7.3.190.0100.00516.66
7.3.180.0150.02316.25
7.3.170.0090.00616.45
7.3.160.0090.00616.26
7.3.120.0100.00514.96
7.3.110.0070.01014.78
7.3.100.0020.01214.63
7.3.90.0070.00914.83
7.3.80.0050.00914.84
7.3.70.0090.00214.69
7.3.60.0050.00514.78
7.3.50.0070.00714.68
7.3.40.0050.01014.67
7.3.30.0060.00514.82
7.3.20.0050.00916.63
7.3.10.0080.00516.46
7.3.00.0090.00416.65
7.2.330.0140.00816.47
7.2.320.0110.00716.42
7.2.310.0040.01216.88
7.2.300.0090.00916.43
7.2.290.0170.00716.68
7.2.250.0100.01014.90
7.2.240.0110.00815.09
7.2.230.0070.01015.06
7.2.220.0100.00515.03
7.2.210.0040.00914.86
7.2.200.0020.01314.81
7.2.190.0070.00714.83
7.2.180.0110.00515.05
7.2.170.0050.00814.95
7.2.60.0040.01117.12
7.2.00.0060.01019.42
7.1.330.0050.00815.69
7.1.320.0030.00715.70
7.1.310.0050.00815.79
7.1.300.0050.00715.60
7.1.290.0050.00815.70
7.1.280.0070.00315.69
7.1.270.0060.00615.71
7.1.260.0040.01015.70
7.1.200.0060.00615.89
7.1.100.0030.01217.95
7.1.70.0040.00416.99
7.1.60.0100.01319.52
7.1.50.0090.00316.82
7.1.00.0030.07322.50
7.0.200.0000.01016.82
7.0.60.0100.08019.93
7.0.50.0000.04317.89
7.0.40.0030.09020.18
7.0.30.0130.04320.06
7.0.20.0300.06020.33
7.0.10.0070.08020.07
7.0.00.0070.08020.21
5.6.280.0030.03321.07
5.6.210.0130.07320.71
5.6.200.0100.08318.20
5.6.190.0100.06720.48
5.6.180.0070.05020.48
5.6.170.0330.07020.62
5.6.160.0000.04720.50
5.6.150.0070.06018.23
5.6.140.0100.06318.21
5.6.130.0070.05018.15
5.6.120.0170.04321.02
5.6.110.0130.08021.13
5.6.100.0030.07721.03
5.6.90.0200.07020.97
5.6.80.0030.05020.37
5.5.350.0200.08320.38
5.5.340.0130.07317.98
5.5.330.0130.07720.25
5.5.320.0200.08020.20
5.5.310.0200.04720.32
5.5.300.0070.06717.92
5.5.290.0100.07317.98
5.5.280.0000.05720.67
5.5.270.0070.08320.86
5.5.260.0130.07320.86
5.5.250.0000.04320.50
5.5.240.0300.07020.07

preferences:
51.05 ms | 401 KiB | 5 Q