3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 1; $bar = 2; $closure = function($foo, $bar) { return function($foo, $bar) { doSomething(); }; }; $class = new class($foo, $bar) { function __construct($foo, $bar) { doSomething(); } }; $instance = new Class($foo, $bar) { function __construct($foo, $bar) { doSomething(); } };

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.0040.01118.39
8.3.50.0050.01621.07
8.3.40.0090.00618.84
8.3.30.0040.01118.89
8.3.20.0040.00420.13
8.3.10.0110.00421.76
8.3.00.0060.00319.55
8.2.180.0090.00916.63
8.2.170.0100.01322.96
8.2.160.0200.00020.44
8.2.150.0040.00424.18
8.2.140.0120.00624.66
8.2.130.0040.00426.16
8.2.120.0090.00020.90
8.2.110.0070.00319.21
8.2.100.0060.00617.75
8.2.90.0080.00018.97
8.2.80.0040.00417.97
8.2.70.0080.00017.62
8.2.60.0030.00517.80
8.2.50.0050.00318.07
8.2.40.0040.00421.13
8.2.30.0000.00719.83
8.2.20.0000.00817.81
8.2.10.0040.00418.16
8.2.00.0040.00418.12
8.1.280.0140.00725.92
8.1.270.0120.00620.30
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00719.13
8.1.230.0090.00317.42
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.48
8.1.190.0000.00817.25
8.1.180.0080.00018.10
8.1.170.0060.00318.59
8.1.160.0040.00422.00
8.1.150.0070.00418.95
8.1.140.0030.00517.42
8.1.130.0000.00817.75
8.1.120.0000.00817.54
8.1.110.0000.00817.41
8.1.100.0000.00717.52
8.1.90.0000.00717.39
8.1.80.0080.00017.34
8.1.70.0030.00517.49
8.1.60.0000.00817.58
8.1.50.0070.00017.42
8.1.40.0000.00817.48
8.1.30.0040.00417.56
8.1.20.0080.00017.66
8.1.10.0040.00417.54
8.1.00.0050.00317.50
8.0.300.0060.00318.77
8.0.290.0070.00016.75
8.0.280.0000.00818.36
8.0.270.0030.00317.17
8.0.260.0040.00417.25
8.0.250.0090.00017.02
8.0.240.0030.00316.93
8.0.230.0030.00317.03
8.0.220.0050.00316.87
8.0.210.0040.00416.92
8.0.200.0000.00717.00
8.0.190.0040.00416.93
8.0.180.0050.00216.93
8.0.170.0000.00816.97
8.0.160.0070.00016.86
8.0.150.0040.00416.88
8.0.140.0050.00216.97
8.0.130.0030.00313.34
8.0.120.0050.00316.82
8.0.110.0040.00416.99
8.0.100.0040.00416.98
8.0.90.0040.00416.94
8.0.80.0080.00716.87
8.0.70.0040.00416.90
8.0.60.0000.00716.99
8.0.50.0000.00717.02
8.0.30.0110.00417.13
8.0.20.0180.00817.40
8.0.10.0040.00417.06
8.0.00.0090.00916.97
7.4.330.0050.00015.08
7.4.320.0040.00416.50
7.4.300.0040.00416.45
7.4.290.0070.00016.56
7.4.280.0000.00716.50
7.4.270.0050.00216.46
7.4.260.0030.00316.58
7.4.250.0050.00316.46
7.4.240.0030.00316.61
7.4.230.0070.00016.41
7.4.220.0100.01016.61
7.4.210.0080.00816.57
7.4.200.0070.00016.50
7.4.160.0130.00316.57
7.4.150.0100.00717.40
7.4.140.0110.01217.86
7.4.130.0060.01316.61
7.4.120.0090.00916.58
7.4.110.0120.00616.64
7.4.100.0150.00316.46
7.4.90.0090.00916.32
7.4.80.0070.01019.39
7.4.70.0110.01516.63
7.4.60.0100.00616.50
7.4.50.0000.00816.72
7.4.40.0040.01416.47
7.4.30.0160.00716.46
7.4.00.0030.01014.91
7.3.330.0000.00513.35
7.3.320.0000.00513.33
7.3.310.0060.00016.43
7.3.300.0000.00616.22
7.3.290.0030.00316.36
7.3.280.0110.00916.31
7.3.270.0070.01017.40
7.3.260.0110.01116.42
7.3.250.0150.00616.43
7.3.240.0040.01316.32
7.3.230.0090.01216.39
7.3.210.0070.01016.49
7.3.200.0110.00719.39
7.3.190.0130.00316.42
7.3.180.0070.01016.45
7.3.170.0070.01016.37
7.3.160.0090.00916.28
7.2.330.0150.00316.50
7.2.320.0090.01416.50
7.2.310.0090.01516.29
7.2.300.0060.01116.70
7.2.290.0100.00716.55
7.2.60.0090.00616.68
7.2.00.0000.01219.21
7.1.200.0060.00615.69
7.1.100.0090.00318.14
7.1.70.0070.00316.70
7.1.60.0110.01420.03
7.1.50.0060.01616.57
7.1.00.0030.07722.34
7.0.200.0060.00316.54
7.0.60.0030.08720.06
7.0.50.0000.06017.85
7.0.40.0070.04020.24
7.0.30.0300.08320.06
7.0.20.0230.04720.10
7.0.10.0070.06020.10
7.0.00.0070.05720.07
5.6.280.0030.07320.86
5.6.210.0170.06720.63
5.6.200.0130.07318.15
5.6.190.0100.04020.77
5.6.180.0500.06720.46
5.6.170.0270.04320.47
5.6.160.0070.09320.52
5.6.150.0070.04018.29
5.6.140.0030.08718.21
5.6.130.0100.08018.17
5.6.120.0030.05021.10
5.6.110.0070.08320.99
5.6.100.0130.07320.98
5.6.90.0070.04020.89
5.6.80.0070.07020.44
5.5.350.0100.08020.33
5.5.340.0000.07017.98
5.5.330.0000.05720.38
5.5.320.2970.05020.36
5.5.310.0270.07020.20
5.5.300.0130.07718.09
5.5.290.0070.05717.97
5.5.280.0200.05320.89
5.5.270.0130.08020.86
5.5.260.0100.08020.77
5.5.250.0130.07020.70
5.5.240.0070.07320.16
5.4.450.0430.06719.43
5.4.440.0570.05319.56
5.4.430.0630.06719.56
5.4.420.0700.04319.42
5.4.410.0600.06019.20
5.4.400.0770.05318.83
5.4.390.0530.06019.06
5.4.380.0500.06719.07
5.4.370.0400.07019.11
5.4.360.0470.06319.09
5.4.350.0500.05318.84
5.4.340.0470.06719.33
5.4.320.0530.06019.07
5.4.310.0600.04719.23
5.4.300.0330.05719.24
5.4.290.0170.05719.07
5.4.280.0200.06019.31
5.4.270.0400.06018.84
5.4.260.0400.05019.20
5.4.250.0330.04319.05
5.4.240.0230.05319.24
5.4.230.0000.06019.09
5.4.220.0370.05719.10
5.4.210.0200.06719.21
5.4.200.0270.05319.24
5.4.190.0170.04719.21
5.4.180.0200.04319.22
5.4.170.0370.05019.23
5.4.160.0430.03719.21
5.4.150.0270.05719.21
5.4.140.0070.05316.47
5.4.130.0270.06716.57
5.4.120.0330.04716.46
5.4.110.0400.05716.70
5.4.100.0430.04716.66
5.4.90.0370.04316.24
5.4.80.0370.04316.63
5.4.70.0370.05716.59
5.4.60.0070.07716.32
5.4.50.0030.07016.51
5.4.40.0270.07016.42
5.4.30.0430.05716.55
5.4.20.0330.03716.33

preferences:
54.47 ms | 401 KiB | 5 Q