3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function foo() { return 'foo'; } function test($arg) { $f = function () use ($arg) { echo $this->foo() . $arg . PHP_EOL; }; $f(); } } $a = new A(); $a->test('baz');

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.5.10.0110.00816.79
8.5.00.0110.00919.97
8.4.160.0030.00623.95
8.4.150.0030.00014.05
8.4.140.0120.01017.45
8.4.130.0110.00917.87
8.4.120.0080.00920.41
8.4.110.0120.00518.69
8.4.100.0050.00617.79
8.4.90.0130.00817.82
8.4.80.0130.00818.03
8.4.70.0050.00317.83
8.4.60.0120.00817.79
8.4.50.0120.00519.48
8.4.40.0070.00418.68
8.4.30.0180.00018.61
8.4.20.0130.00720.59
8.4.10.0090.00019.43
8.3.290.0120.01020.82
8.3.280.0010.00014.05
8.3.270.0140.00516.75
8.3.260.0080.01116.49
8.3.250.0120.00617.39
8.3.240.0080.01016.71
8.3.230.0110.00916.53
8.3.220.0040.00417.06
8.3.210.0160.00516.66
8.3.200.0110.00818.83
8.3.190.0100.00817.00
8.3.180.0110.00816.43
8.3.170.0070.01020.55
8.3.160.0090.00916.51
8.3.150.0120.00620.65
8.3.140.0060.00318.54
8.3.130.0080.00018.41
8.3.120.0130.00618.94
8.3.110.0040.00820.94
8.3.100.0070.01024.06
8.3.90.0110.00426.77
8.3.80.0030.00619.36
8.3.70.0090.00618.18
8.3.60.0040.01118.43
8.3.50.0100.00317.96
8.3.40.0140.00018.66
8.3.30.0110.00318.75
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0000.00926.16
8.2.300.0110.01018.10
8.2.290.0110.00819.12
8.2.280.0070.00118.30
8.2.270.0140.00317.06
8.2.260.0000.00818.79
8.2.250.0060.00316.85
8.2.240.0110.00417.23
8.2.230.0090.00022.58
8.2.220.0080.00837.54
8.2.210.0100.01026.77
8.2.200.0040.00418.88
8.2.190.0110.00316.58
8.2.180.0070.00725.92
8.2.170.0130.00718.96
8.2.160.0070.01022.96
8.2.150.0040.00425.66
8.2.140.0050.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00321.07
8.2.100.0110.00018.03
8.2.90.0040.00419.10
8.2.80.0040.00417.97
8.2.70.0070.00317.38
8.2.60.0040.00418.05
8.2.50.0100.00018.07
8.2.40.0000.00818.03
8.2.30.0000.00818.06
8.2.20.0030.00518.27
8.2.10.0000.00719.11
8.2.00.0060.00319.21
8.1.340.0050.00417.55
8.1.330.0090.01016.14
8.1.320.0140.00515.85
8.1.310.0030.00716.68
8.1.300.0030.00516.06
8.1.290.0070.00430.84
8.1.280.0070.01025.92
8.1.270.0050.00223.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00620.93
8.1.230.0080.00417.83
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00517.35
8.1.180.0080.00018.10
8.1.170.0060.00318.64
8.1.160.0000.00718.77
8.1.150.0070.00018.94
8.1.140.0070.00018.93
8.1.130.0030.00320.30
8.1.120.0000.00817.43
8.1.110.0030.00517.48
8.1.100.0060.00317.43
8.1.90.0040.00417.38
8.1.80.0030.00717.48
8.1.70.0000.00917.39
8.1.60.0040.00417.50
8.1.50.0050.00317.57
8.1.40.0030.00517.47
8.1.30.0030.00617.53
8.1.20.0030.00617.59
8.1.10.0040.00417.46
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0050.00216.63
8.0.280.0000.00718.43
8.0.270.0030.00317.87
8.0.260.0000.00718.61
8.0.250.0000.00716.95
8.0.240.0000.00716.99
8.0.230.0030.00316.82
8.0.220.0070.00016.93
8.0.210.0000.00716.81
8.0.200.0080.00016.93
8.0.190.0110.00016.96
8.0.180.0030.00316.89
8.0.170.0040.00416.92
8.0.160.0050.00316.86
8.0.150.0030.00316.73
8.0.140.0070.00316.83
8.0.130.0030.00313.34
8.0.120.0000.00816.93
8.0.110.0040.00416.79
8.0.100.0000.00716.84
8.0.90.0040.00416.82
8.0.80.0030.01216.81
8.0.70.0030.01316.81
8.0.60.0130.01016.75
8.0.50.0130.01016.79
8.0.30.0160.00016.92
8.0.20.0090.01216.94
8.0.10.0000.02016.98
8.0.00.0080.00917.01
7.4.330.0000.00615.55
7.4.320.0000.00616.49
7.4.300.0030.00316.52
7.4.290.0030.00316.52
7.4.280.0080.00016.50
7.4.270.0040.00416.64
7.4.260.0000.00513.28
7.4.250.0080.00016.41
7.4.240.0050.00316.48
7.4.230.0040.00416.69
7.4.220.0030.00316.69
7.4.210.0070.01016.57
7.4.200.0090.00616.55
7.4.190.0130.00616.53
7.4.180.0030.01316.45
7.4.160.0070.01116.61
7.4.150.0090.00916.48
7.4.140.0050.01616.57
7.4.130.0060.00916.48
7.4.120.0130.01016.38
7.4.110.0110.00816.45
7.4.100.0140.00916.66
7.4.90.0040.01216.31
7.4.80.0110.00716.55
7.4.70.0000.01616.55
7.4.60.0030.01416.43
7.4.50.0060.00916.30
7.4.40.0080.00816.47
7.4.30.0000.01616.48
7.4.20.0070.01116.48
7.4.10.0070.00716.54
7.4.00.0060.01216.66
7.3.330.0030.00616.31
7.3.320.0080.00013.13
7.3.310.0040.00416.33
7.3.300.0030.00316.12
7.3.290.0050.00916.32
7.3.280.0130.00616.32
7.3.270.0040.01016.29
7.3.260.0120.00616.29
7.3.250.0110.00416.31
7.3.240.0100.01016.31
7.3.230.0200.00016.31
7.3.220.0040.01516.25
7.3.210.0070.01316.30
7.3.200.0100.01016.23
7.3.190.0100.01016.25
7.3.180.0060.01316.19
7.3.170.0080.01116.31
7.3.160.0040.01116.20
7.3.150.0120.00316.22
7.3.140.0110.00316.29
7.3.130.0040.01116.21
7.3.120.0110.00316.15
7.3.110.0030.01016.14
7.3.100.0040.01116.09
7.3.90.0090.00616.52
7.3.80.0080.00816.28
7.3.70.0040.01116.33
7.3.60.0070.00716.42
7.3.50.0080.00616.35
7.3.40.0060.01316.38
7.3.30.0130.00316.42
7.3.20.0090.00616.51
7.3.10.0070.00716.32
7.3.00.0040.01116.32

preferences:
36.47 ms | 403 KiB | 5 Q