3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; use Bar\B; class A { public function foo(): Closure { $b = new B(); return function() use ($b) { $b->bar(); }; } } namespace Bar; use Buzz\ImportedException; class B { public function bar() { throw new ImportedException(); } } namespace Buzz; use \Exception; class ImportedException extends Exception { } $a = new A(); $closure = $a->foo(); $closure();

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.0120.00918.31
8.3.50.0070.00716.24
8.3.40.0140.00718.63
8.3.30.0120.00618.81
8.3.20.0080.00019.12
8.3.10.0080.00020.81
8.3.00.0040.00419.69
8.2.180.0120.00916.50
8.2.170.0070.00722.96
8.2.160.0000.01419.07
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0080.00019.82
8.2.120.0040.00426.35
8.2.110.0070.00421.11
8.2.100.0030.00918.03
8.2.90.0000.00817.91
8.2.80.0060.00317.97
8.2.70.0040.00417.93
8.2.60.0040.00418.03
8.2.50.0080.00018.10
8.2.40.0060.00320.90
8.2.30.0040.00319.30
8.2.20.0040.00418.00
8.2.10.0060.00618.04
8.2.00.0040.00419.29
8.1.280.0120.00325.92
8.1.270.0050.00323.81
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0050.00523.92
8.1.230.0110.00022.17
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00417.10
8.1.190.0040.00417.22
8.1.180.0040.00418.10
8.1.170.0080.00018.50
8.1.160.0070.00018.64
8.1.150.0040.00418.77
8.1.140.0040.00417.56
8.1.130.0030.00318.86
8.1.120.0000.00717.34
8.1.110.0040.00417.21
8.1.100.0050.00217.24
8.1.90.0040.00617.18
8.1.80.0030.00517.37
8.1.70.0070.00017.26
8.1.60.0040.00417.41
8.1.50.0000.00817.32
8.1.40.0090.00017.49
8.1.30.0000.00817.51
8.1.20.0040.00417.48
8.1.10.0040.00417.52
8.1.00.0020.00517.34
8.0.300.0070.00019.69
8.0.290.0090.00016.75
8.0.280.0040.00418.27
8.0.270.0000.00717.21
8.0.260.0000.00817.11
8.0.250.0040.00416.92
8.0.240.0040.00416.86
8.0.230.0000.00716.97
8.0.220.0020.00516.81
8.0.210.0030.00316.78
8.0.200.0000.00616.84
8.0.190.0030.00616.95
8.0.180.0000.00716.91
8.0.170.0030.00616.91
8.0.160.0050.00316.89
8.0.150.0030.00816.78
8.0.140.0070.00016.84
8.0.130.0000.00613.36
8.0.120.0070.00016.81
8.0.110.0030.00616.84
8.0.100.0000.00716.75
8.0.90.0000.00716.69
8.0.80.0140.00516.86
8.0.70.0000.00716.80
8.0.60.0000.00716.96
8.0.50.0070.00016.78
8.0.30.0090.00717.11
8.0.20.0110.01117.40
8.0.10.0040.00416.89
8.0.00.0060.01116.54
7.4.330.0050.00015.55
7.4.320.0000.00616.52
7.4.300.0040.00416.45
7.4.290.0040.00416.58
7.4.280.0000.00816.43
7.4.270.0070.00016.55
7.4.260.0040.00416.41
7.4.250.0000.01016.30
7.4.240.0040.00416.58
7.4.230.0000.00716.62
7.4.220.0030.00516.57
7.4.210.0060.01016.59
7.4.200.0030.00316.61
7.4.160.0110.00916.56
7.4.140.0100.01017.86
7.4.130.0110.00616.47
7.4.120.0050.01316.50
7.4.110.0150.00616.32
7.4.100.0150.00616.32
7.4.90.0050.01116.49
7.4.80.0120.00919.39
7.4.70.0100.00716.51
7.4.60.0120.01116.29
7.4.50.0000.01416.45
7.4.40.0080.01016.51
7.4.00.0030.01315.02
7.3.330.0000.00513.29
7.3.320.0030.00313.24
7.3.310.0000.00616.34
7.3.300.0000.00716.27
7.3.290.0000.00616.42
7.3.280.0100.00716.29
7.3.260.0100.00816.35
7.3.240.0080.01016.43
7.3.230.0120.01216.23
7.3.210.0090.01516.49
7.3.200.0070.01416.38
7.3.190.0110.00616.19
7.3.180.0030.01316.55
7.3.170.0090.00616.45
7.3.160.0130.01016.45
7.3.10.0130.01316.07
7.3.00.0090.00916.32
7.2.330.0130.01016.41
7.2.320.0180.00616.50
7.2.310.0090.00916.59
7.2.300.0120.00616.55
7.2.290.0090.00916.53
7.2.130.0140.01416.42
7.2.120.0160.00316.64
7.2.110.0240.00416.41
7.2.100.0150.00916.47
7.2.90.0080.01916.41
7.2.80.0130.00616.54
7.2.70.0120.00616.53
7.2.60.0880.00815.40
7.2.50.1050.00815.66
7.2.40.0980.00815.75
7.2.30.1130.01115.60
7.2.20.0820.00815.73
7.2.10.0980.01215.86
7.2.00.0840.01115.91
7.1.250.0040.01215.55
7.1.200.0050.00315.58
7.1.170.1730.01013.65
7.1.160.1980.01116.46
7.1.150.1920.01116.17
7.1.140.1440.01316.25
7.1.130.1580.01016.20
7.1.120.1730.01316.69
7.1.110.1750.01316.14
7.1.100.1760.01016.02
7.1.90.2340.01115.86
7.1.80.1360.00816.04
7.1.70.1530.00915.14
7.1.60.1770.01333.32
7.1.50.1530.01432.91
7.1.40.1390.01132.44
7.1.30.1960.01432.56
7.1.20.2250.02032.66
7.1.10.1970.01114.67
7.1.00.1910.01714.80

preferences:
48.16 ms | 401 KiB | 5 Q