3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '{"Body": {"stkCallback": {"MerchantRequestID":"26452-605723-2","CheckoutRequestID":"ws_CO_23042018105859659","ResultCode":0,"ResultDesc":"The service request is processed successfully.","CallbackMetadata": {"Item":[{"Name":"Amount","Value":1.00},{"Name":"MpesaReceiptNumber","Value":"MDN6ZJE4XG"},{"Name":"Balance"},{"Name":"TransactionDate","Value":20180423105912},{"Name":"PhoneNumber","Value":254722200121}]}}}}'; $arr = json_decode($str,true); echo $arr['Body']['stkCallback']['MerchantRequestID'] . "\n"; // Working //echo $arr['Body']['stkCallback']['CallbackMetadata'] . "\n"; echo $arr['Body']['stkCallback']['CallbackMetadata']['Item'][1]['Value'] . "\n"; echo $arr['Body']['stkCallback']['CallbackMetadata']['Item'][3]['Value'] . "\n"; echo $arr['Body']['stkCallback']['CallbackMetadata']['Item'][4]['Value'] . "\n"; echo $arr['Body']['stkCallback']['CallbackMetadata']['Item'][0]['Value'] ."\n"; /*Foreach($arr['Body']['stkCallback']['CallbackMetadata']['Item'] as $subarr){ Foreach($subarr as $item){ Echo $item ."\n"; } } */

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.4.10.0030.00517.90
8.3.140.0140.00418.29
8.3.130.0040.00418.55
8.3.120.0060.00320.90
8.3.110.0060.00320.94
8.3.100.0030.00716.66
8.3.90.0100.01026.77
8.3.80.0100.00016.50
8.3.70.0150.00616.58
8.3.60.0040.01216.36
8.3.50.0090.01123.57
8.3.40.0090.00618.74
8.3.30.0140.00018.67
8.3.20.0080.00020.91
8.3.10.0080.00021.96
8.3.00.0000.00723.53
8.2.260.0000.00816.40
8.2.250.0080.00018.38
8.2.240.0150.00317.38
8.2.230.0030.00622.58
8.2.220.0040.00424.06
8.2.210.0090.00026.77
8.2.200.0060.00318.41
8.2.190.0120.00918.16
8.2.180.0040.01125.92
8.2.170.0140.00719.13
8.2.160.0090.01222.96
8.2.150.0150.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00326.16
8.2.120.0070.00019.77
8.2.110.0060.00319.30
8.2.100.0070.00418.28
8.2.90.0080.00018.03
8.2.80.0030.00618.94
8.2.70.0040.00748.63
8.2.60.0060.00448.41
8.2.50.0040.00648.48
8.2.40.0100.00438.81
8.2.30.0090.00538.38
8.2.20.0090.00430.56
8.2.10.0080.00631.06
8.2.00.0090.00338.70
8.1.300.0000.00918.26
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0000.00821.80
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00422.59
8.1.230.0060.00620.90
8.1.220.0040.00417.79
8.1.210.0030.00518.78
8.1.200.0040.00748.23
8.1.190.0070.00348.28
8.1.180.0110.00048.71
8.1.170.0080.00438.19
8.1.160.0090.00438.61
8.1.150.0080.00438.67
8.1.140.0070.00539.22
8.1.130.0050.00838.11
8.1.120.0050.00738.08
8.1.110.0080.00638.09
8.1.100.0100.00238.14
8.1.90.0100.00438.13
8.1.80.0100.00438.13
8.1.70.0090.00438.14
8.1.60.0080.00638.17
8.1.50.0100.00638.12
8.1.40.0100.00638.12
8.1.30.0070.00533.00
8.1.20.0090.00333.01
8.1.10.0130.00133.02
8.1.00.0100.00432.96
8.0.300.0080.00020.09
8.0.290.0040.00747.97
8.0.280.0090.00330.54
8.0.270.0080.00438.28
8.0.260.0050.00737.92
8.0.250.0080.00337.91
8.0.240.0070.00437.93
8.0.230.0100.00337.97
8.0.220.0070.00637.96
8.0.210.0070.00637.94
8.0.200.0070.00537.96
8.0.190.0110.00437.95
8.0.180.0120.00137.96
8.0.170.0110.00437.95
8.0.160.0070.00427.39
8.0.150.0090.00332.67
8.0.140.0090.00432.62
8.0.130.0070.00631.78
8.0.120.0100.00232.67
8.0.110.0100.00432.65
8.0.100.0080.00532.69
8.0.90.0120.00232.67
8.0.80.0090.00829.52
8.0.70.0090.00332.63
8.0.60.0060.00832.66
8.0.50.0110.00332.61
8.0.30.0080.00632.66
8.0.20.0090.00632.73
8.0.10.0080.00432.66
8.0.00.0140.00232.60
7.4.330.0060.00437.87
7.4.320.0090.00437.80
7.4.300.0100.00437.76
7.4.290.0060.00837.81
7.4.280.0100.00232.45
7.4.270.0100.00532.47
7.4.260.0100.00631.67
7.4.250.0120.00432.48
7.4.240.0090.00429.24
7.4.230.0100.00332.51
7.4.220.0090.00332.46
7.4.210.0080.00727.13
7.4.200.0080.00432.48
7.4.190.0050.00837.83
7.4.180.0040.00937.79
7.4.160.0080.00637.79
7.4.150.0080.00637.79
7.4.140.0080.00537.80
7.4.130.0110.00432.47
7.4.120.0120.00432.43
7.4.110.0110.00532.49
7.4.100.0080.00832.44
7.4.90.0110.00625.53
7.4.80.0090.00825.98
7.4.70.0130.00525.54
7.4.60.0120.00625.52
7.4.50.0100.00725.54
7.4.40.0090.00825.59
7.4.30.0080.01027.06
7.4.20.0120.00722.78
7.4.10.0080.00922.82
7.4.00.0100.00822.85
7.3.330.0110.00532.27
7.3.320.0080.00631.56
7.3.310.0120.00532.39
7.3.300.0120.00232.32
7.3.290.0090.00732.39
7.3.280.0130.00632.36
7.3.270.0120.00637.66
7.3.260.0130.00432.38
7.3.250.0130.00537.75
7.3.240.0090.00725.49
7.3.230.0110.00632.46
7.3.220.0150.00337.67
7.3.210.0110.00625.48
7.3.200.0120.00625.57
7.3.190.0110.00725.52
7.3.180.0140.00625.54
7.3.170.0120.00725.51
7.3.160.0130.00525.47
7.3.150.0140.00527.12
7.3.140.0130.00624.34
7.3.130.0100.00822.71
7.3.120.0080.01122.73
7.3.110.0120.00622.71
7.3.100.0090.00922.73
7.3.90.0120.00722.72
7.3.80.0100.00922.71
7.3.70.0120.00822.73
7.3.60.0120.00722.74
7.3.50.0120.00922.70
7.3.40.0110.00822.70
7.3.30.0110.00922.70
7.3.20.0140.00622.75
7.3.10.0130.00622.68
7.3.00.0130.00722.74
7.2.340.0090.00837.73
7.2.330.0110.00725.75
7.2.320.0100.00925.79
7.2.310.0110.00825.64
7.2.300.0130.00625.61
7.2.290.0100.01025.75
7.2.280.0150.00427.19
7.2.270.0130.00624.52
7.2.260.0100.00822.81
7.2.250.0110.00722.98
7.2.240.0110.00822.87
7.2.230.0140.00622.96
7.2.220.0100.00822.93
7.2.210.0120.00822.84
7.2.200.0110.00722.94
7.2.190.0110.00922.87
7.2.180.0110.01022.86
7.2.170.0110.00922.96
7.2.160.0110.00822.92
7.2.150.0100.00923.04
7.2.140.0120.00722.92
7.2.130.0110.01122.96
7.2.120.0090.01022.94
7.2.110.0100.01022.91
7.2.100.0110.01022.93
7.2.90.0130.00722.91
7.2.80.0110.00922.91
7.2.70.0100.00922.91
7.2.60.0110.00822.96
7.2.50.0120.00722.91
7.2.40.0130.00822.94
7.2.30.0130.00822.96
7.2.20.0120.00922.96
7.2.10.0170.00722.92
7.2.00.0160.00622.93

preferences:
48.81 ms | 403 KiB | 5 Q