3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json = '{"lenght":0,"subcategory":[]}'; $last_id = 123; $obj = json_decode($json, true); array_push($obj["subcategory"], $last_id); $obj["lenght"] = (int)$obj["lenght"] + 1; $json = json_encode($obj); echo $json;

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.5.30.0120.00519.48
8.5.20.0080.01019.48
8.5.10.0100.00918.36
8.5.00.0140.00919.74
8.4.180.0150.00819.77
8.4.170.0120.01023.95
8.4.160.0110.01024.02
8.4.150.0090.00316.87
8.4.140.0100.01217.39
8.4.130.0100.01017.45
8.4.120.0100.00920.71
8.4.110.0080.00122.43
8.4.100.0140.00717.57
8.4.90.0140.00717.71
8.4.80.0150.00517.88
8.4.70.0050.00617.57
8.4.60.0080.00518.51
8.4.50.0120.00717.76
8.4.40.0170.00317.57
8.4.30.0080.00020.71
8.4.20.0170.00317.79
8.4.10.0060.01317.57
8.3.300.0050.00520.79
8.3.290.0110.00820.72
8.3.280.0130.00718.04
8.3.270.0150.00516.62
8.3.260.0080.01116.86
8.3.250.0120.00718.85
8.3.240.0130.00616.78
8.3.230.0100.00916.50
8.3.220.0100.01017.08
8.3.210.0090.00516.73
8.3.200.0050.00316.53
8.3.190.0110.00717.35
8.3.180.0110.00716.52
8.3.170.0140.00717.03
8.3.160.0040.00416.57
8.3.150.0110.00717.30
8.3.140.0050.00318.35
8.3.130.0090.00016.61
8.3.120.0140.00418.93
8.3.110.0000.00816.53
8.3.100.0080.00016.57
8.3.90.0040.00426.77
8.3.80.0090.00019.36
8.3.70.0110.00418.43
8.3.60.0210.00016.50
8.3.50.0140.00718.25
8.3.40.0110.00718.84
8.3.30.0150.00018.84
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.300.0100.00718.96
8.2.290.0070.00920.51
8.2.280.0100.00918.53
8.2.270.0070.01120.91
8.2.260.0080.00018.99
8.2.250.0070.00416.73
8.2.240.0150.00416.78
8.2.230.0030.00620.94
8.2.220.0030.00524.06
8.2.210.0080.00026.77
8.2.200.0040.00418.88
8.2.190.0150.00618.16
8.2.180.0090.00625.92
8.2.170.0110.01118.91
8.2.160.0140.00022.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00026.35
8.2.110.0050.00519.81
8.2.100.0080.00417.91
8.2.90.0040.00417.75
8.2.80.0090.00018.77
8.2.70.0080.00017.63
8.2.60.0040.00418.03
8.2.50.0080.00018.05
8.2.40.0060.00618.28
8.2.30.0070.00018.12
8.2.20.0050.00218.18
8.2.10.0020.00520.97
8.2.00.0000.00719.20
8.1.340.0080.01221.52
8.1.330.0110.00718.38
8.1.320.0100.00916.28
8.1.310.0060.01216.66
8.1.300.0030.01616.04
8.1.290.0060.00330.84
8.1.280.0100.00725.92
8.1.270.0020.00523.99
8.1.260.0030.00328.09
8.1.250.0070.00028.09
8.1.240.0120.00624.05
8.1.230.0040.00722.63
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0000.00817.13
8.1.190.0030.00517.22
8.1.180.0030.00518.10
8.1.170.0030.00818.58
8.1.160.0040.00418.94
8.1.150.0050.00218.89
8.1.140.0000.00718.85
8.1.130.0000.00719.99
8.1.120.0000.00717.44
8.1.110.0000.00817.32
8.1.100.0040.00417.48
8.1.90.0050.00217.41
8.1.80.0000.01017.48
8.1.70.0040.00417.52
8.1.60.0040.00417.59
8.1.50.0040.00417.47
8.1.40.0000.00817.40
8.1.30.0000.00917.64
8.1.20.0030.00617.57
8.1.10.0040.00417.43
8.1.00.0060.00617.57
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.44
8.0.270.0030.00317.96
8.0.260.0030.00318.45
8.0.250.0030.00316.98
8.0.240.0000.00716.95
8.0.230.0000.00716.82
8.0.220.0030.00316.76
8.0.210.0030.00316.79
8.0.200.0000.00716.88
8.0.190.0080.00016.77
8.0.180.0000.00716.74
8.0.170.0040.00416.90
8.0.160.0040.00416.78
8.0.150.0050.00216.65
8.0.140.0080.00016.62
8.0.130.0060.00013.21
8.0.120.0000.00916.78
8.0.110.0000.00716.73
8.0.100.0070.00016.78
8.0.90.0050.00316.64
8.0.80.0030.01316.80
8.0.70.0040.00416.61
8.0.60.0000.00816.88
8.0.50.0080.00016.70
8.0.30.0040.01816.81
8.0.20.0080.01516.81
8.0.10.0100.00816.97
8.0.00.0100.00717.06
7.4.330.0000.00515.55
7.4.320.0000.00616.45
7.4.300.0030.00616.49
7.4.290.0030.00316.55
7.4.280.0000.00716.44
7.4.270.0040.00416.54
7.4.260.0000.00513.20
7.4.250.0000.00716.54
7.4.240.0040.00316.56
7.4.230.0050.00316.71
7.4.220.0020.00516.37
7.4.210.0090.00816.60
7.4.200.0030.00316.61
7.4.160.0070.01416.60
7.4.150.0070.00816.57
7.4.140.0120.00816.37
7.4.130.0060.01216.52
7.4.120.0130.00616.43
7.4.110.0100.00516.51
7.4.100.0100.00816.48
7.4.90.0100.00916.54
7.4.80.0110.00816.56
7.4.70.0100.00916.44
7.4.60.0040.01516.45
7.4.50.0060.01216.35
7.4.40.0090.00816.38
7.4.30.0100.01316.47
7.4.20.0120.01216.45
7.4.10.0220.00916.41
7.4.00.0120.00416.49
7.3.330.0000.00716.25
7.3.320.0000.00513.19
7.3.310.0030.00516.28
7.3.300.0000.00716.31
7.3.290.0070.00716.36
7.3.270.0110.00716.29
7.3.260.0190.00516.38
7.3.250.0080.01016.30
7.3.240.0050.01416.38
7.3.230.0090.00916.32
7.3.220.0080.01216.25
7.3.210.0100.01016.29
7.3.200.0100.01416.24
7.3.190.0150.00316.28
7.3.180.0130.00616.24
7.3.170.0090.00716.26
7.3.160.0090.01116.23
7.3.150.0060.01416.30
7.3.140.0140.01316.27
7.3.130.0070.01016.25
7.3.120.0120.00616.29
7.3.110.0150.00516.28
7.3.100.0110.00816.20
7.3.90.0090.01116.43
7.3.80.0130.00816.24
7.3.70.0060.01016.41
7.3.60.0030.01516.38
7.3.50.0080.00716.43
7.3.40.0130.00616.41
7.3.30.0170.00816.47
7.3.20.0040.00916.45
7.3.10.0070.01316.40
7.3.00.0130.00616.39

preferences:
114.22 ms | 1372 KiB | 5 Q