3v4l.org

run code in 300+ PHP versions simultaneously
<?hh $something = 42; $closure = function (string $str) : int use (&$something) { return strlen($str) + $something; }; $something = 3; echo $closure("hello"); $something = 4; echo $closure("hello");

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.0100.01016.50
8.3.50.0140.00721.01
8.3.40.0070.01018.49
8.3.30.0100.01018.42
8.3.20.0000.00820.21
8.3.10.0090.00023.49
8.3.00.0040.00423.36
8.2.180.0090.00918.38
8.2.170.0110.00422.96
8.2.160.0100.00320.35
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0060.00319.21
8.2.120.0040.00426.35
8.2.110.0030.00622.28
8.2.100.0090.00317.80
8.2.90.0040.00419.22
8.2.80.0030.00517.97
8.2.70.0030.00717.50
8.2.60.0030.00517.91
8.2.50.0000.00818.07
8.2.40.0050.00322.33
8.2.30.0000.01120.60
8.2.20.0030.00517.54
8.2.10.0030.00517.98
8.2.00.0000.00717.94
8.1.280.0110.00425.92
8.1.270.0110.00722.01
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0100.00021.98
8.1.230.0110.00019.10
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00417.10
8.1.190.0000.00917.10
8.1.180.0090.00018.10
8.1.170.0050.00318.47
8.1.160.0040.00420.60
8.1.150.0040.00418.75
8.1.140.0080.00019.36
8.1.130.0080.00017.61
8.1.120.0000.00717.31
8.1.110.0040.00417.21
8.1.100.0000.00717.22
8.1.90.0000.00817.36
8.1.80.0000.00817.21
8.1.70.0060.00317.28
8.1.60.0000.00717.39
8.1.50.0000.00817.23
8.1.40.0050.00317.41
8.1.30.0000.00817.47
8.1.20.0000.00717.41
8.1.10.0040.00417.34
8.1.00.0000.00717.37
8.0.300.0040.00418.77
8.0.290.0000.00716.58
8.0.280.0040.00418.36
8.0.270.0030.00317.18
8.0.260.0000.00617.09
8.0.250.0030.00316.80
8.0.240.0000.00716.70
8.0.230.0000.00716.87
8.0.220.0000.00716.81
8.0.210.0040.00416.75
8.0.200.0030.00316.70
8.0.190.0080.00016.70
8.0.180.0000.00716.78
8.0.170.0050.00316.78
8.0.160.0050.00316.79
8.0.150.0070.00016.64
8.0.140.0000.00716.68
8.0.130.0030.00313.30
8.0.120.0040.00416.75
8.0.110.0080.00016.69
8.0.100.0040.00416.65
8.0.90.0050.00316.64
8.0.80.0110.00416.78
8.0.70.0000.00716.73
8.0.60.0040.00416.60
8.0.50.0040.00416.65
8.0.30.0140.00817.08
8.0.20.0110.00817.40
8.0.10.0000.00816.68
8.0.00.0110.00716.53
7.4.330.0020.00216.88
7.4.320.0000.00616.34
7.4.300.0000.00716.28
7.4.290.0000.00716.45
7.4.280.0050.00316.45
7.4.270.0030.00316.47
7.4.260.0030.00316.35
7.4.250.0000.00816.37
7.4.240.0040.00316.37
7.4.230.0030.00316.27
7.4.220.0000.01516.34
7.4.210.0060.00916.36
7.4.200.0030.00316.11
7.4.160.0060.00916.26
7.4.150.0140.00417.40
7.4.140.0160.00817.86
7.4.130.0140.00516.28
7.4.120.0070.01016.39
7.4.110.0090.00916.30
7.4.100.0100.01016.33
7.4.90.0130.00316.43
7.4.80.0070.01019.39
7.4.70.0110.00516.20
7.4.60.0060.01016.46
7.4.50.0090.00916.29
7.4.40.0100.01116.39
7.4.30.0060.00916.28
7.3.330.0050.00013.08
7.3.320.0050.00013.20
7.3.310.0020.00515.97
7.3.300.0070.00016.14
7.3.290.0060.00916.18
7.3.280.0080.01016.17
7.3.270.0100.00617.40
7.3.260.0140.00316.32
7.3.250.0120.00516.25
7.3.240.0070.01016.14
7.3.230.0100.00616.39
7.3.210.0070.01016.53
7.3.200.0070.01116.12
7.3.190.0040.01416.30
7.3.180.0120.01216.13
7.3.170.0080.00816.27
7.3.160.0030.01316.26
7.2.330.0070.01016.42
7.2.320.0070.01016.20
7.2.310.0100.00716.25
7.2.300.0170.00316.36
7.2.290.0060.01116.39
7.0.00.0030.06020.25
5.6.160.0030.07020.54
5.6.150.0030.04018.22
5.6.140.0070.04018.24
5.6.130.0070.04718.18
5.6.120.0030.06721.09
5.6.110.0100.07320.97
5.6.100.0070.04021.04
5.6.90.0000.07720.98
5.6.80.0100.07020.53
5.5.300.0000.06318.09
5.5.290.0070.07317.98
5.5.280.0030.04320.89
5.5.270.0130.07720.97
5.5.260.0130.07020.76
5.5.250.0100.07320.65
5.5.240.0170.03720.23

preferences:
39.33 ms | 401 KiB | 5 Q