3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = json_decode('[bar'); // many lines of code. $bar = json_encode('Hello world!', JSON_THROW_ON_ERROR); if (json_last_error() !== JSON_ERROR_NONE) { throw new Exception("encoding went wrong!"); } echo "All is fine";

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.00618.43
8.3.50.0130.00518.35
8.3.40.0110.00418.79
8.3.30.0060.00818.84
8.3.20.0040.00421.73
8.3.10.0080.00019.12
8.3.00.0040.00421.90
8.2.180.0150.00625.92
8.2.170.0120.00322.96
8.2.160.0030.01022.08
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00826.16
8.2.110.0100.00820.90
8.2.100.0080.00918.35
8.2.90.0090.00618.41
8.2.80.0050.00918.86
8.2.70.0110.00518.13
8.2.60.0070.00918.15
8.2.50.0080.00618.32
8.2.40.0070.00719.10
8.2.30.0100.00318.42
8.2.20.0070.00718.32
8.2.10.0070.00118.81
8.2.00.0080.00619.29
8.1.280.0070.01525.92
8.1.270.0050.00320.75
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0080.00821.26
8.1.230.0080.00820.72
8.1.220.0060.00818.18
8.1.210.0130.00219.38
8.1.200.0040.01117.88
8.1.190.0050.00917.71
8.1.180.0030.01118.29
8.1.170.0090.00519.03
8.1.160.0060.00419.61
8.1.150.0090.00318.54
8.1.140.0050.00919.42
8.1.130.0070.00617.97
8.1.120.0050.00518.03
8.1.110.0090.00317.88
8.1.100.0050.00318.04
8.1.90.0050.00718.05
8.1.80.0050.00817.89
8.1.70.0050.00417.90
8.1.60.0020.00818.07
8.1.50.0050.00517.97
8.1.40.0090.00318.07
8.1.30.0070.00118.14
8.1.20.0050.00418.04
8.1.10.0050.00418.17
8.1.00.0040.00418.18
8.0.300.0050.00320.02
8.0.290.0050.00417.33
8.0.280.0020.00718.09
8.0.270.0040.00317.60
8.0.260.0040.00417.31
8.0.250.0020.00717.43
8.0.240.0050.00317.46
8.0.230.0000.00817.40
8.0.220.0060.00117.41
8.0.210.0020.00717.35
8.0.200.0050.00517.45
8.0.190.0050.00417.32
8.0.180.0050.00417.42
8.0.170.0050.00517.31
8.0.160.0050.00517.38
8.0.150.0050.00417.39
8.0.140.0040.00417.38
8.0.130.0050.00315.67
8.0.120.0010.00717.34
8.0.110.0050.00417.48
8.0.100.0050.00417.50
8.0.90.0040.00417.41
8.0.80.0070.00617.22
8.0.70.0000.00817.50
8.0.60.0080.00417.33
8.0.50.0050.00417.41
8.0.30.0090.00517.63
8.0.20.0040.01117.55
8.0.10.0080.00017.53
8.0.00.0090.01017.19
7.4.330.0040.00415.21
7.4.320.0040.00417.03
7.4.300.0060.00116.99
7.4.290.0090.00216.89
7.4.280.0090.00516.97
7.4.270.0090.00517.02
7.4.260.0070.00217.04
7.4.250.0070.00716.88
7.4.240.0030.00517.05
7.4.230.0100.00416.88
7.4.220.0050.00716.88
7.4.210.0090.00616.76
7.4.200.0040.00417.06
7.4.190.0030.00517.63
7.4.180.0120.00817.63
7.4.160.0090.00816.68
7.4.150.0060.00317.39
7.4.140.0040.00417.42
7.4.130.0080.00717.01
7.4.120.0050.00817.05
7.4.110.0110.00617.01
7.4.100.0170.00316.98
7.4.90.0170.00916.73
7.4.80.0220.00818.53
7.4.70.0250.00516.87
7.4.60.0160.00917.03
7.4.50.0160.00016.90
7.4.40.0080.01016.93
7.4.30.0200.00017.46
7.4.20.0170.00317.55
7.4.10.0200.00017.34
7.4.00.0080.00715.92
7.3.330.0030.00715.16
7.3.320.0120.00615.15
7.3.310.0090.00716.64
7.3.300.0080.00716.79
7.3.290.0110.00816.77
7.3.280.0210.00816.81
7.3.270.0140.00517.28
7.3.260.0080.00916.53
7.3.250.0110.00817.23
7.3.240.0100.00816.61
7.3.230.0160.00816.78
7.3.220.0200.00617.24
7.3.210.0240.00616.89
7.3.200.0180.00316.84
7.3.190.0230.00716.87
7.3.180.0200.00716.76
7.3.170.0170.00516.88
7.3.160.0090.01016.82
7.3.150.0170.00717.22
7.3.140.0160.00417.20
7.3.130.0190.00017.07
7.3.120.0080.01115.97
7.3.110.0180.00815.80
7.3.100.0150.01115.97
7.3.90.0190.00816.12
7.3.80.0120.01415.83
7.3.70.0140.00915.81
7.3.60.0110.00616.06
7.3.50.0120.01015.64
7.3.40.0100.00515.59
7.3.30.0130.00815.67
7.3.20.0160.00317.60
7.3.10.0110.00817.34
7.3.00.0130.00617.56
7.2.340.0090.00917.44
7.2.330.0180.00817.11
7.2.320.0200.00917.02
7.2.310.0210.00717.28
7.2.300.0200.01117.07
7.2.290.0190.01216.79
7.2.280.0310.01717.41
7.2.270.0290.00417.17
7.2.260.0220.01117.20
7.2.250.0200.01016.13
7.2.240.0180.01116.07
7.2.230.0200.00716.20
7.2.220.0190.00915.94
7.2.210.0130.00716.03
7.2.200.0100.01216.12
7.2.190.0140.00416.31
7.2.180.0100.00815.87
7.2.170.0170.00715.90
7.2.160.0190.01316.42
7.2.150.0210.00318.10
7.2.140.0260.00618.16
7.2.130.0180.01018.26
7.2.120.0140.01018.18
7.2.110.0150.00518.22
7.2.100.0100.00518.19
7.2.90.0110.00617.98
7.2.80.0120.00318.20
7.2.70.0040.01018.26
7.2.60.0110.01118.11
7.2.50.0120.00518.23
7.2.40.0170.00418.08
7.2.30.0110.00618.25
7.2.20.0190.01518.29
7.2.10.0190.00418.22
7.2.00.0170.00518.31
7.1.330.0060.00616.94
7.1.320.0120.00617.04
7.1.310.0220.00016.91
7.1.300.0070.01316.96
7.1.290.0130.00516.82
7.1.280.0110.00616.37
7.1.270.0080.00616.44
7.1.260.0060.01016.48
7.1.250.0100.00416.88
7.1.240.0150.00317.92
7.1.230.0310.00418.11
7.1.220.0240.00818.23
7.1.210.0190.00518.27
7.1.200.0180.00018.05
7.1.190.0080.00818.16
7.1.180.0220.00618.02
7.1.170.0270.00318.20
7.1.160.0160.00018.06
7.1.150.0280.00918.05
7.1.140.0310.00417.93
7.1.130.0250.01118.20
7.1.120.0330.00318.18
7.1.110.0150.00517.99
7.1.100.0200.01518.34
7.1.90.0160.00318.14
7.1.80.0280.00418.41
7.1.70.0310.00618.07
7.1.60.0120.00618.18
7.1.50.0180.01118.32
7.1.40.0300.00618.29
7.1.30.0320.00318.11
7.1.20.0200.00318.20
7.1.10.0130.00318.13
7.1.00.0130.00318.19

preferences:
55.05 ms | 401 KiB | 5 Q