3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NS { class C { public $fn; public function __construct() { $this->fn = function (string $arg) { var_dump("fn"); }; } } } namespace { $fn = (new NS\C)->fn; $fn("null"); echo "Done\n"; }

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.00318.55
8.3.50.0100.00821.17
8.3.40.0040.01218.98
8.3.30.0110.00418.65
8.3.20.0040.00420.34
8.3.10.0040.00423.54
8.3.00.0040.00420.35
8.2.180.0070.00716.38
8.2.170.0070.00722.96
8.2.160.0100.00720.39
8.2.150.0030.00624.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00617.50
8.2.110.0000.01122.24
8.2.100.0110.00017.93
8.2.90.0090.00019.22
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0110.00017.91
8.2.50.0000.00918.07
8.2.40.0040.00419.30
8.2.30.0000.00720.57
8.2.20.0040.00417.73
8.2.10.0090.00018.11
8.2.00.0040.00417.98
8.1.280.0000.01625.92
8.1.270.0120.00923.88
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0110.00722.61
8.1.230.0000.01219.26
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0000.00817.22
8.1.180.0000.00718.10
8.1.170.0090.00018.37
8.1.160.0000.00722.02
8.1.150.0000.00718.81
8.1.140.0030.00517.38
8.1.130.0000.00817.62
8.1.120.0050.00317.50
8.1.110.0030.00517.46
8.1.100.0040.00417.38
8.1.90.0070.00017.46
8.1.80.0030.00517.48
8.1.70.0030.00317.46
8.1.60.0000.00817.47
8.1.50.0030.00517.45
8.1.40.0000.00917.55
8.1.30.0050.00317.69
8.1.20.0000.00717.57
8.1.10.0070.00017.54
8.1.00.0060.00317.51
8.0.300.0000.00818.77
8.0.290.0060.00316.88
8.0.280.0030.00318.45
8.0.270.0000.00717.21
8.0.260.0030.00317.26
8.0.250.0080.00016.89
8.0.240.0000.00816.87
8.0.230.0030.00316.93
8.0.220.0040.00416.77
8.0.210.0000.00716.87
8.0.200.0040.00416.87
8.0.190.0080.00016.96
8.0.180.0030.00516.92
8.0.170.0060.00316.81
8.0.160.0070.00016.98
8.0.150.0070.00016.81
8.0.140.0070.00016.73
8.0.130.0000.00513.24
8.0.120.0040.00416.76
8.0.110.0030.00616.82
8.0.100.0030.00516.96
8.0.90.0030.00316.72
8.0.80.0060.00916.86
8.0.70.0030.00516.84
8.0.60.0060.00316.91
8.0.50.0050.00316.91
8.0.30.0080.00717.13
8.0.20.0130.00717.40
8.0.10.0000.00717.04
8.0.00.0110.00616.77
7.4.330.0000.00515.12
7.4.320.0030.00316.59
7.4.300.0030.00316.52
7.4.290.0070.00016.52
7.4.280.0040.00416.41
7.4.270.0030.00316.40
7.4.260.0070.00016.51
7.4.250.0030.00516.52
7.4.240.0060.00116.54
7.4.230.0030.00316.63
7.4.220.0100.01616.45
7.4.210.0070.01016.66
7.4.200.0030.00316.70
7.4.160.0060.00916.55
7.4.150.0110.00917.40
7.4.140.0140.00917.86
7.4.130.0110.01116.52
7.4.120.0090.01016.42
7.4.110.0030.01316.41
7.4.100.0150.00316.56
7.4.90.0060.01216.47
7.4.80.0070.01019.39
7.4.70.0000.01616.41
7.4.60.0070.01016.32
7.4.50.0080.00016.43
7.4.40.0060.01216.62
7.4.30.0090.00916.52
7.4.00.0100.00814.93
7.3.330.0000.00613.28
7.3.320.0030.00313.12
7.3.310.0000.00816.34
7.3.300.0030.00316.17
7.3.290.0090.00616.29
7.3.280.0100.00516.32
7.3.270.0000.01817.40
7.3.260.0140.00316.54
7.3.250.0060.01016.28
7.3.240.0110.01116.55
7.3.230.0030.01416.39
7.3.210.0110.00616.45
7.3.200.0070.01416.31
7.3.190.0080.00816.24
7.3.180.0090.00616.47
7.3.170.0120.00616.28
7.3.160.0100.01016.30
7.3.120.0110.00714.91
7.3.110.0060.00914.77
7.3.100.0070.00415.06
7.3.90.0090.00914.84
7.3.80.0030.01014.73
7.3.70.0100.00714.89
7.3.60.0030.00914.82
7.3.50.0140.00314.69
7.3.40.0040.00714.78
7.3.30.0090.00614.76
7.3.20.0040.00416.62
7.3.10.0080.00616.53
7.3.00.0060.00716.68
7.2.330.0140.00416.80
7.2.320.0030.01416.64
7.2.310.0120.00916.36
7.2.300.0060.00916.39
7.2.290.0060.01016.64
7.2.250.0070.01115.20
7.2.240.0170.00315.33
7.2.230.0060.00914.95
7.2.220.0030.00814.96
7.2.210.0060.00915.17
7.2.200.0040.01114.80
7.2.190.0000.00915.07
7.2.180.0070.01114.98
7.2.170.0030.01015.11
7.2.130.0040.01117.00
7.2.120.0030.00916.76
7.2.110.0080.00617.05
7.2.100.0030.01016.83
7.2.90.0080.00417.07
7.2.80.0070.00716.88
7.2.70.0060.00616.72
7.2.60.0090.00216.98
7.2.50.0080.00316.89
7.2.40.0040.00817.01
7.2.30.0060.00316.86
7.2.20.0030.00916.78
7.2.10.0110.00016.75
7.2.00.0050.01018.22
7.1.330.0110.00415.83
7.1.320.0040.01115.66
7.1.310.0090.00315.73
7.1.300.0100.00315.62
7.1.290.0040.01115.72
7.1.280.0000.01215.75
7.1.270.0000.01115.65
7.1.260.0130.00015.76
7.1.250.0110.00415.51
7.1.200.0160.00715.45
7.1.100.0030.00817.98
7.1.70.0070.00316.97
7.1.60.0100.01419.29
7.1.50.0060.01817.02
7.1.00.0000.08022.43
7.0.200.0040.00416.73
7.0.60.0170.02720.01
7.0.50.0130.03717.86
7.0.40.0070.08320.30
7.0.30.0230.04720.06
7.0.20.0130.05020.33
7.0.10.0100.05720.12
7.0.00.0130.08020.20
5.6.280.0070.06321.16
5.6.210.0070.08020.77
5.6.200.0000.05318.17
5.6.190.0030.05320.64
5.6.180.0330.08020.64
5.6.170.0300.07720.44
5.6.160.0030.05020.61
5.6.150.0030.05018.19
5.6.140.0070.07318.18
5.6.130.0070.05718.14
5.6.120.0170.07321.13
5.6.110.0000.08721.05
5.6.100.0030.07721.03
5.6.90.0200.07321.01
5.6.80.0070.08320.52
5.5.350.0130.07320.42
5.5.340.0000.05017.95
5.5.330.0030.09320.29
5.5.320.4030.04320.42
5.5.310.0300.05020.25
5.5.300.0000.04717.94
5.5.290.0100.08017.95
5.5.280.0100.08720.95
5.5.270.0070.04720.83
5.5.260.0100.08720.73
5.5.250.0170.07320.69
5.5.240.0030.06320.07
5.4.450.0100.06719.60
5.4.440.0170.05319.46
5.4.430.0170.05319.66
5.4.420.0200.07019.54
5.4.410.0130.06019.47
5.4.400.0300.04019.14
5.4.390.0030.06318.84
5.4.380.0100.05319.01
5.4.370.0230.06319.15
5.4.360.0200.05019.21
5.4.350.0170.05018.84
5.4.340.0100.06019.24
5.4.320.0100.06018.98
5.4.310.0200.04719.10
5.4.300.0130.05319.25
5.4.290.0130.06319.12
5.4.280.0130.06319.25
5.4.270.0130.07019.24
5.4.260.0200.06019.14
5.4.250.0230.05319.06
5.4.240.0130.05719.25
5.4.230.0200.05019.33
5.4.220.0270.05319.25
5.4.210.0100.06019.29
5.4.200.0170.05019.28
5.4.190.0170.05318.83
5.4.180.0170.05019.13
5.4.170.0200.04719.00
5.4.160.0130.05318.99
5.4.150.0200.05019.32
5.4.140.0330.03716.39
5.4.130.0270.03316.44
5.4.120.0100.05316.79
5.4.110.0270.05316.24
5.4.100.0130.06716.50
5.4.90.0130.05016.33
5.4.80.0100.05016.61
5.4.70.0230.04016.41
5.4.60.0030.07316.51
5.4.50.0030.06716.56
5.4.40.0230.07016.53
5.4.30.0170.03716.42
5.4.20.0000.07316.51

preferences:
49.89 ms | 401 KiB | 5 Q