3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { class T {} } namespace { class Test { public function first(string $str) : Closure { return function() use ($str) : int { return strlen($str); }; } public function second() : self { return $this; } } class SubTest extends Test { public function third() : parent { return new Test; } } $s = new SubTest; $t = $s->third(); echo ($t->second()->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.0070.00716.50
8.3.50.0150.00821.90
8.3.40.0150.00618.60
8.3.30.0100.01018.84
8.3.20.0040.00420.34
8.3.10.0000.00723.66
8.3.00.0160.00323.59
8.2.180.0170.00318.54
8.2.170.0140.00722.96
8.2.160.0140.00020.48
8.2.150.0080.00024.18
8.2.140.0110.00324.66
8.2.130.0090.00021.00
8.2.120.0070.00326.35
8.2.110.0030.00722.38
8.2.100.0070.00317.93
8.2.90.0040.00419.21
8.2.80.0030.00517.97
8.2.70.0090.00017.50
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0090.00022.09
8.2.30.0040.00420.68
8.2.20.0000.00717.63
8.2.10.0000.00817.93
8.2.00.0030.00617.96
8.1.280.0120.00325.92
8.1.270.0040.00420.32
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0120.00923.86
8.1.230.0080.00319.15
8.1.220.0090.00017.74
8.1.210.0110.00018.77
8.1.200.0000.01017.22
8.1.190.0060.00317.25
8.1.180.0090.00018.10
8.1.170.0040.00418.45
8.1.160.0050.00220.70
8.1.150.0000.00718.93
8.1.140.0040.00419.57
8.1.130.0070.00017.70
8.1.120.0000.00717.36
8.1.110.0050.00317.49
8.1.100.0060.00317.54
8.1.90.0000.00817.38
8.1.80.0000.00717.50
8.1.70.0070.00017.42
8.1.60.0050.00317.54
8.1.50.0080.00017.41
8.1.40.0040.00417.45
8.1.30.0000.00817.65
8.1.20.0000.00817.71
8.1.10.0000.00917.57
8.1.00.0040.00417.55
8.0.300.0000.00818.77
8.0.290.0030.00516.75
8.0.280.0030.00318.36
8.0.270.0070.00017.16
8.0.260.0000.00617.36
8.0.250.0050.00316.98
8.0.240.0070.00016.99
8.0.230.0030.00516.86
8.0.220.0000.00716.80
8.0.210.0040.00416.79
8.0.200.0030.00316.90
8.0.190.0050.00316.85
8.0.180.0030.00516.80
8.0.170.0000.00716.89
8.0.160.0070.00016.93
8.0.150.0050.00316.75
8.0.140.0000.00716.73
8.0.130.0000.00713.24
8.0.120.0000.00716.88
8.0.110.0040.00416.89
8.0.100.0040.00416.97
8.0.90.0050.00516.86
8.0.80.0100.00716.85
8.0.70.0050.00216.77
8.0.60.0050.00216.84
8.0.50.0000.00816.99
8.0.30.0100.01017.12
8.0.20.0100.00917.40
8.0.10.0040.00416.84
8.0.00.0150.00616.79
7.4.330.0020.00216.79
7.4.320.0030.00316.39
7.4.300.0000.00816.48
7.4.290.0060.00016.46
7.4.280.0070.00016.63
7.4.270.0040.00416.64
7.4.260.0050.00316.41
7.4.250.0040.00416.47
7.4.240.0000.00716.50
7.4.230.0030.00316.43
7.4.220.0080.00816.53
7.4.210.0070.00716.51
7.4.200.0040.00416.33
7.4.160.0040.01216.38
7.4.150.0070.01017.40
7.4.140.0050.01317.86
7.4.130.0050.01216.40
7.4.120.0130.00616.62
7.4.110.0090.00816.29
7.4.100.0060.01116.52
7.4.90.0090.00916.38
7.4.80.0130.00719.39
7.4.70.0070.01116.30
7.4.60.0130.00316.38
7.4.50.0070.00416.50
7.4.40.0110.00716.39
7.4.30.0110.00716.63
7.4.00.0060.00914.69
7.3.330.0000.00613.29
7.3.320.0030.00313.35
7.3.310.0000.00716.47
7.3.300.0080.00016.20
7.3.290.0040.01416.37
7.3.280.0120.00816.35
7.3.270.0100.01017.40
7.3.260.0100.00716.37
7.3.250.0120.00716.29
7.3.240.0130.00516.52
7.3.230.0030.01416.43
7.3.210.0120.00916.57
7.3.200.0120.00616.42
7.3.190.0130.00316.30
7.3.180.0090.00616.41
7.3.170.0120.00916.54
7.3.160.0030.01316.59
7.2.330.0090.00916.70
7.2.320.0130.01016.38
7.2.310.0130.00316.84
7.2.300.0120.00916.79
7.2.290.0090.01216.50
7.2.60.0090.00616.82
7.2.00.0060.00619.09
7.1.200.0090.00315.83
7.1.100.0000.01518.00
7.1.70.0000.00717.19
7.1.60.0210.00319.52
7.1.50.0070.00716.67
7.1.00.0000.08022.33
7.0.200.0000.00916.81
7.0.60.0030.05319.96
7.0.50.0100.05717.88
7.0.40.0030.04320.11
7.0.30.0270.04020.24
7.0.20.0170.07320.15
7.0.10.0070.05320.07
7.0.00.0030.08320.14
5.6.280.0000.05321.08
5.6.210.0170.07720.47
5.6.200.0100.07718.19
5.6.190.0170.07320.67
5.6.180.0170.04020.47
5.6.170.0370.06320.54
5.6.160.0130.05720.56
5.6.150.0130.07018.18
5.6.140.0170.07018.16
5.6.130.0100.08318.23
5.6.120.0030.04721.02
5.6.110.0030.04321.03
5.6.100.0130.05321.11
5.6.90.0030.06021.13
5.6.80.0070.08320.39
5.5.350.0230.07320.33
5.5.340.0100.07018.06
5.5.330.0100.05720.26
5.5.320.0200.04320.27
5.5.310.0200.05720.31
5.5.300.0000.04017.94
5.5.290.0070.08018.03
5.5.280.0130.07720.65
5.5.270.0000.04320.87
5.5.260.0130.03020.77
5.5.250.0170.07320.68
5.5.240.0170.05720.26

preferences:
62.09 ms | 401 KiB | 5 Q