3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ini_set('display_errors', true); class A { private $func = null; public function __construct($func) { $this->func = $func; } public function exec() { $this->func(); } } $a = new A(function() { echo 'works'; }); $a->exec();

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.70.0160.00616.88
8.3.60.0150.00016.63
8.3.50.0080.01221.20
8.3.40.0140.00418.67
8.3.30.0070.01018.92
8.3.20.0040.00420.16
8.3.10.0040.00423.57
8.3.00.0040.00423.52
8.2.190.0150.00316.61
8.2.180.0140.00718.41
8.2.170.0090.00922.96
8.2.160.0000.01520.47
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00021.11
8.2.120.0040.00426.35
8.2.110.0070.00321.00
8.2.100.0110.00017.91
8.2.90.0000.00818.03
8.2.80.0000.00819.09
8.2.70.0060.00318.00
8.2.60.0030.00617.91
8.2.50.0060.00318.10
8.2.40.0000.00822.20
8.2.30.0000.00719.32
8.2.20.0040.00717.75
8.2.10.0040.00418.12
8.2.00.0040.00418.16
8.1.280.0140.00025.92
8.1.270.0110.00722.20
8.1.260.0080.00028.09
8.1.250.0000.00728.09
8.1.240.0090.00022.15
8.1.230.0060.00621.04
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0030.00718.50
8.1.160.0000.00820.34
8.1.150.0000.00820.68
8.1.140.0040.00419.50
8.1.130.0050.00317.67
8.1.120.0000.00717.53
8.1.110.0030.00517.36
8.1.100.0040.00417.36
8.1.90.0040.00417.41
8.1.80.0000.00817.43
8.1.70.0040.00417.36
8.1.60.0030.00617.60
8.1.50.0060.00317.54
8.1.40.0000.00817.52
8.1.30.0060.00317.59
8.1.20.0040.00417.62
8.1.10.0050.00317.57
8.1.00.0040.00417.53
8.0.300.0040.00419.95
8.0.290.0080.00016.75
8.0.280.0070.00018.40
8.0.270.0000.00717.22
8.0.260.0060.00017.21
8.0.250.0000.00716.99
8.0.240.0040.00416.98
8.0.230.0000.00716.97
8.0.220.0000.00716.90
8.0.210.0000.00716.89
8.0.200.0000.00717.05
8.0.190.0040.00416.99
8.0.180.0040.00416.93
8.0.170.0040.00417.00
8.0.160.0000.00716.89
8.0.150.0040.00416.95
8.0.140.0040.00416.83
8.0.130.0000.00713.33
8.0.120.0080.00016.94
8.0.110.0000.00816.95
8.0.100.0000.00716.88
8.0.90.0050.00216.80
8.0.80.0110.00316.89
8.0.70.0040.00416.90
8.0.60.0040.00416.91
8.0.50.0080.00016.87
8.0.30.0240.00517.16
8.0.20.0090.01217.40
8.0.10.0070.00016.99
8.0.00.0070.01416.66
7.4.330.0000.00616.77
7.4.320.0040.00416.43
7.4.300.0000.00816.48
7.4.290.0030.00316.56
7.4.280.0000.00816.59
7.4.270.0000.00716.63
7.4.260.0000.00716.50
7.4.250.0000.00716.60
7.4.240.0040.00416.55
7.4.230.0030.00316.68
7.4.220.0090.00716.58
7.4.210.0140.00316.51
7.4.200.0030.00316.38
7.4.160.0100.00616.68
7.4.150.0110.00617.40
7.4.140.0110.01217.86
7.4.130.0160.01016.50
7.4.120.0110.00616.63
7.4.110.0100.00716.56
7.4.100.0130.01016.63
7.4.90.0070.01116.57
7.4.80.0090.00919.39
7.4.70.0060.01416.45
7.4.60.0110.00716.50
7.4.50.0060.01016.54
7.4.40.0070.01516.61
7.4.30.0120.00516.81
7.4.00.0110.00615.08
7.3.330.0000.00713.28
7.3.320.0030.00313.23
7.3.310.0000.00716.36
7.3.300.0000.00716.30
7.3.290.0050.00316.38
7.3.280.0100.00616.35
7.3.270.0070.01017.40
7.3.260.0110.00716.69
7.3.240.0050.01316.34
7.3.230.0100.00716.39
7.3.210.0130.00316.50
7.3.200.0080.00819.39
7.3.190.0120.00916.59
7.3.180.0140.00716.39
7.3.170.0070.01416.40
7.3.160.0030.01416.30
7.3.120.0080.00814.66
7.3.110.0120.00614.67
7.3.100.0030.01014.66
7.3.90.0000.01214.61
7.3.80.0030.00614.91
7.3.70.0040.01114.57
7.3.60.0090.00614.77
7.3.50.0080.00614.59
7.3.40.0070.00714.94
7.3.30.0030.01014.70
7.3.20.0070.00716.70
7.3.10.0060.01016.40
7.3.00.0060.00316.43
7.2.330.0110.00716.39
7.2.320.0030.01616.68
7.2.310.0060.01016.69
7.2.300.0130.00316.68
7.2.290.0030.01216.64
7.2.250.0100.01014.89
7.2.240.0060.01014.90
7.2.230.0070.01114.90
7.2.220.0030.00715.14
7.2.210.0030.01214.93
7.2.200.0060.00614.92
7.2.190.0150.00314.90
7.2.180.0070.00715.11
7.2.170.0060.00914.74
7.2.60.0120.00316.87
7.2.00.0080.00819.45
7.1.330.0070.00715.78
7.1.320.0000.00915.70
7.1.310.0120.00415.63
7.1.300.0060.00915.77
7.1.290.0030.00915.62
7.1.280.0090.00015.78
7.1.270.0030.00715.38
7.1.260.0080.00615.74
7.1.200.0060.00615.72
7.1.100.0000.01218.04
7.1.70.0050.00217.25
7.1.60.0090.01619.40
7.1.50.0090.00316.82
7.1.00.0030.07722.37
7.0.200.0080.00016.48
7.0.60.0000.08321.71
7.0.50.0070.08017.86
7.0.40.0000.05020.26
7.0.30.0130.04320.25
7.0.20.0400.07320.07
7.0.10.0100.09020.15
7.0.00.0070.03720.24
5.6.280.0070.06721.05
5.6.210.0130.05320.63
5.6.200.0030.05718.20
5.6.190.0000.05320.47
5.6.180.0330.06020.68
5.6.170.0270.04320.47
5.6.160.0030.04320.45
5.6.150.0100.04318.14
5.6.140.0070.03718.14
5.6.130.0000.04318.28
5.6.120.0100.03320.98
5.6.110.0230.06721.14
5.6.100.0100.06720.89
5.6.90.0100.04020.89
5.6.80.0030.06320.44
5.5.350.4170.04320.36
5.5.340.0100.07717.93
5.5.330.0030.08320.57
5.5.320.0570.07320.36
5.5.310.0230.03720.23
5.5.300.0000.04717.94
5.5.290.0100.06017.95
5.5.280.0000.06020.89
5.5.270.0070.08320.73
5.5.260.0070.07720.96
5.5.250.0030.04020.78
5.5.240.0130.07020.27

preferences:
44.47 ms | 401 KiB | 5 Q