3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cart_array = json_decode('{ "items":[ { "count":"1", "cart_id":123, "plu":"TP16", "description":"Bag" }, { "count":1, "cart_id":1234, "plu":"DISCT10", "description":"10% Discount" } ], "total":9.9, "discount_total":9.9 }', true); $cart_array['items'] = array_column($cart_array['items'], NULL, 'cart_id'); Var_dump($cart_array);

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.00.0160.00619.87
8.4.150.0030.00014.05
8.4.140.0130.00917.73
8.4.130.0090.01018.89
8.4.120.0140.00523.99
8.4.110.0140.00620.70
8.4.100.0110.00918.86
8.4.90.0090.01020.69
8.4.80.0130.00718.82
8.4.70.0100.01318.01
8.4.60.0130.00718.83
8.4.50.0120.01018.78
8.4.40.0030.00619.32
8.4.30.0060.01517.55
8.4.20.0090.00019.43
8.4.10.0070.00317.50
8.3.280.0080.01218.22
8.3.270.0160.00616.57
8.3.260.0120.00816.53
8.3.250.0100.00818.96
8.3.240.0090.00617.18
8.3.230.0090.01016.22
8.3.220.0130.00618.85
8.3.210.0070.00116.50
8.3.200.0060.00316.63
8.3.190.0120.00716.91
8.3.180.0090.01016.50
8.3.170.0110.00720.34
8.3.160.0060.01216.97
8.3.150.0040.01517.22
8.3.140.0090.00916.44
8.3.130.0060.00316.43
8.3.120.0060.00320.84
8.3.110.0030.01320.94
8.3.100.0040.00418.41
8.3.90.0000.00826.77
8.3.80.0060.00318.43
8.3.70.0070.01116.38
8.3.60.0060.00918.18
8.3.50.0050.00817.22
8.3.40.0060.01018.81
8.3.30.0100.00718.63
8.3.20.0040.00419.20
8.3.10.0060.00323.53
8.3.00.0030.00623.53
8.2.290.0090.00820.54
8.2.280.0110.00218.30
8.2.270.0150.00417.32
8.2.260.0060.00319.24
8.2.250.0000.00818.33
8.2.240.0000.01017.14
8.2.230.0040.00422.58
8.2.220.0060.01324.06
8.2.210.0030.00626.77
8.2.200.0030.00616.63
8.2.190.0150.00616.63
8.2.180.0240.00325.92
8.2.170.0110.00422.96
8.2.160.0110.00419.12
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00020.94
8.2.110.0040.00722.22
8.2.100.0040.00817.91
8.2.90.0030.00518.03
8.2.80.0040.00419.16
8.2.70.0040.00417.50
8.2.60.0030.00618.03
8.2.50.0030.00618.10
8.2.40.0040.00420.25
8.2.30.0040.00418.08
8.2.20.0050.00217.95
8.2.10.0000.00818.05
8.2.00.0000.00719.50
8.1.330.0100.00821.68
8.1.320.0110.00918.09
8.1.310.0090.00916.72
8.1.300.0040.00420.29
8.1.290.0030.00630.84
8.1.280.0030.01025.92
8.1.270.0060.00320.07
8.1.260.0170.00026.35
8.1.250.0090.00028.09
8.1.240.0040.00422.52
8.1.230.0120.00020.96
8.1.220.0070.00317.78
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0030.00517.35
8.1.180.0000.00718.10
8.1.170.0040.00418.46
8.1.160.0060.00318.75
8.1.150.0040.00418.82
8.1.140.0000.00718.89
8.1.130.0000.00719.08
8.1.120.0050.00217.33
8.1.110.0000.00717.29
8.1.100.0070.00017.25
8.1.90.0000.01017.34
8.1.80.0050.00217.29
8.1.70.0030.00617.41
8.1.60.0080.00317.50
8.1.50.0060.00317.48
8.1.40.0000.00817.46
8.1.30.0030.00617.65
8.1.20.0040.00417.59
8.1.10.0030.00517.54
8.1.00.0000.00817.42
8.0.300.0050.00320.13
8.0.290.0060.00316.63
8.0.280.0000.00818.44
8.0.270.0040.00416.75
8.0.260.0070.00017.20
8.0.250.0000.00716.80
8.0.240.0040.00416.95
8.0.230.0070.00016.79
8.0.220.0000.00816.85
8.0.210.0030.00316.75
8.0.200.0070.00016.94
8.0.190.0030.00616.80
8.0.180.0000.00716.81
8.0.170.0030.00616.78
8.0.160.0050.00216.75
8.0.150.0030.00616.82
8.0.140.0040.00416.74
8.0.130.0060.00013.30
8.0.120.0080.00016.76
8.0.110.0070.00016.91
8.0.100.0040.00416.75
8.0.90.0040.00416.75
8.0.80.0110.01016.82
8.0.70.0040.00416.88
8.0.60.0000.00716.84
8.0.50.0000.00716.82
8.0.30.0090.00817.09
8.0.20.0180.00617.40
8.0.10.0040.00416.82
8.0.00.0100.01216.75
7.4.330.0000.00715.55
7.4.320.0030.00316.53
7.4.300.0030.00316.36
7.4.290.0080.00016.52
7.4.280.0070.00016.47
7.4.270.0000.00916.48
7.4.260.0030.00316.44
7.4.250.0080.00016.27
7.4.240.0040.00416.45
7.4.230.0040.00416.64
7.4.220.0030.00516.52
7.4.210.0100.00416.47
7.4.200.0000.00716.65
7.4.160.0080.00816.44
7.4.140.0090.00917.86
7.4.130.0100.00716.43
7.4.120.0100.00916.37
7.4.110.0130.00516.57
7.4.100.0090.01216.51
7.4.90.0180.00416.59
7.4.80.0070.01019.39
7.4.70.0100.01116.54
7.4.60.0160.00316.24
7.4.50.0090.00916.43
7.4.40.0110.01116.22
7.4.00.0030.00914.99
7.3.330.0000.00512.95
7.3.320.0000.00513.00
7.3.310.0040.00416.15
7.3.300.0040.00416.24
7.3.290.0030.00316.26
7.3.280.0040.01316.29
7.3.260.0120.00716.42
7.3.240.0100.00816.38
7.3.230.0120.00616.59
7.3.210.0060.01216.59
7.3.200.0140.00316.66
7.3.190.0090.00616.32
7.3.180.0090.00616.29
7.3.170.0060.01216.37
7.3.160.0120.00416.36
7.2.330.0060.01316.33
7.2.320.0090.01016.61
7.2.310.0090.00916.37
7.2.300.0070.01616.32
7.2.290.0030.01416.41
7.2.80.0610.00314.46
7.2.70.0710.00314.84
7.2.60.0480.00714.77
7.2.50.0470.00714.84
7.2.40.0500.00414.71
7.2.30.0390.01014.78
7.2.20.0520.01714.61
7.2.10.0440.00614.86
7.2.00.0650.01014.81
7.1.200.0090.00315.70
7.1.190.0460.01313.66
7.1.180.0340.01213.72
7.1.170.1180.00314.02
7.1.160.0470.00613.58
7.1.150.0440.00313.88
7.1.140.0470.00313.63
7.1.130.0540.00613.89
7.1.120.0620.00713.73
7.1.110.0450.00313.82
7.1.100.0480.01013.77
7.1.90.0480.00613.76
7.1.80.0540.00613.81
7.1.70.0560.00713.54
7.1.60.0980.00731.68
7.1.50.1080.01331.89
7.1.40.0790.00631.36
7.1.30.0950.01031.80
7.1.20.0780.00731.64
7.1.10.0870.00913.54
7.1.00.0770.00413.72

preferences:
157.33 ms | 403 KiB | 5 Q