3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shipmentDet = '{"{\"Coupon\": \"\", \"PromotionName\": \"FREE Tighty Wifey\", \"DiscountAmount\": 23.75}","{\"Coupon\": \"get20\", \"PromotionName\": \"GET20\", \"DiscountAmount\": 20}"}'; $newString = str_replace('","', '"},~;{"', $shipmentDet); $explore = explode(',~;', $newString); $decode = substr($explore[0], 1, -1); print_r($decode[0]); //print_r($explore); foreach ($explore as $cpnItm) { $json_decoder = (array)json_decode($decode,true); //print_r($json_decoder[0]); // print_r($json_decoder[0]['PromotionName']); }

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.0090.00918.30
8.3.50.0090.00922.88
8.3.40.0110.00418.84
8.3.30.0080.00818.58
8.3.20.0000.00720.33
8.3.10.0040.00421.81
8.3.00.0040.00420.77
8.2.180.0120.00318.16
8.2.170.0040.01122.96
8.2.160.0040.01120.53
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00020.56
8.2.120.0070.00026.35
8.2.110.0030.00620.53
8.2.100.0040.00817.84
8.2.90.0000.00819.39
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00419.07
8.2.50.0040.00418.10
8.2.40.0000.00720.42
8.2.30.0030.00519.31
8.2.20.0000.00817.74
8.2.10.0000.00718.05
8.2.00.0060.00317.99
8.1.280.0070.01025.92
8.1.270.0040.00423.88
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00323.83
8.1.230.0070.00420.98
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0060.00318.61
8.1.160.0000.00718.93
8.1.150.0060.00318.76
8.1.140.0050.00319.57
8.1.130.0080.00017.69
8.1.120.0000.00717.47
8.1.110.0030.00517.39
8.1.100.0000.00817.53
8.1.90.0050.00317.46
8.1.80.0040.00417.46
8.1.70.0050.00317.42
8.1.60.0040.00417.66
8.1.50.0040.00417.60
8.1.40.0030.00517.48
8.1.30.0040.00417.68
8.1.20.0000.00917.62
8.1.10.0060.00317.42
8.1.00.0000.00817.55
8.0.300.0000.00918.77
8.0.290.0000.00716.75
8.0.280.0000.00718.51
8.0.270.0030.00317.18
8.0.260.0060.00017.31
8.0.250.0070.00016.86
8.0.240.0000.00816.95
8.0.230.0000.00717.02
8.0.220.0030.00516.80
8.0.210.0050.00516.78
8.0.200.0040.00416.93
8.0.190.0070.00016.93
8.0.180.0040.00416.87
8.0.170.0000.00716.83
8.0.160.0000.00716.89
8.0.150.0070.00016.87
8.0.140.0080.00016.82
8.0.130.0050.00013.32
8.0.120.0000.00816.87
8.0.110.0040.00416.93
8.0.100.0050.00216.95
8.0.90.0050.00216.90
8.0.80.0130.00616.88
8.0.70.0040.00416.76
8.0.60.0040.00416.75
8.0.50.0040.00416.71
8.0.30.0110.00917.19
8.0.20.0120.00917.40
8.0.10.0030.00616.98
8.0.00.0070.01016.75
7.4.330.0060.00015.08
7.4.320.0000.00616.50
7.4.300.0050.00216.53
7.4.290.0000.00716.60
7.4.280.0000.00716.50
7.4.270.0000.00616.58
7.4.260.0030.00316.39
7.4.250.0030.00316.44
7.4.240.0050.00216.52
7.4.230.0000.00716.64
7.4.220.0120.00616.70
7.4.210.0060.00916.61
7.4.200.0040.00416.54
7.4.160.0080.00816.36
7.4.150.0140.01117.40
7.4.140.0070.01017.86
7.4.130.0050.01516.36
7.4.120.0070.01016.58
7.4.110.0140.00316.54
7.4.100.0100.01016.46
7.4.90.0110.00816.52
7.4.80.0030.01819.39
7.4.70.0080.00916.55
7.4.60.0030.01316.49
7.4.50.0120.00316.38
7.4.40.0100.00616.34
7.4.30.0030.01416.43
7.4.00.0040.01214.91
7.3.330.0030.00313.13
7.3.320.0000.00613.08
7.3.310.0040.00416.30
7.3.300.0030.00316.31
7.3.290.0060.00016.17
7.3.280.0080.01116.26
7.3.270.0070.01017.40
7.3.260.0100.01016.47
7.3.250.0110.00816.28
7.3.240.0110.01016.48
7.3.230.0030.01316.48
7.3.210.0110.00716.32
7.3.200.0080.01216.53
7.3.190.0100.00616.29
7.3.180.0120.00916.71
7.3.170.0080.00716.49
7.3.160.0100.00616.59
7.2.330.0090.01216.66
7.2.320.0100.00716.47
7.2.310.0070.01716.75
7.2.300.0030.01416.69
7.2.290.0160.02816.36
7.2.00.0060.00619.55
7.1.70.0100.00017.05
7.1.60.0210.00419.90
7.1.00.0000.08022.54
7.0.200.0460.01014.77
7.0.70.0300.06319.96
7.0.60.0430.06020.02
7.0.50.0370.05320.26
7.0.40.0330.05720.33
7.0.30.0330.07020.44
7.0.20.0200.05720.23
7.0.10.0170.07020.23
7.0.00.0100.06720.38
5.6.280.0030.07320.81
5.6.220.0300.06020.48
5.6.210.0430.06320.64
5.6.200.0130.06321.09
5.6.190.0270.06321.02
5.6.180.0400.04321.17
5.6.170.0300.05721.09
5.6.160.0230.05021.17
5.6.150.0070.06321.16
5.6.140.0100.06021.07
5.6.130.0170.05721.17
5.6.120.0130.06021.13
5.6.110.0230.05321.07
5.6.100.0230.05021.13
5.6.90.0100.06321.07
5.6.80.0100.06020.46
5.6.70.0270.06020.44
5.6.60.0270.06020.38
5.6.50.0130.05720.46
5.6.40.0170.05320.41
5.6.30.0130.05720.43
5.6.20.0130.06720.45
5.6.10.0100.06320.42
5.6.00.0130.05320.52
5.5.360.0500.05020.38
5.5.350.0230.07020.49
5.5.340.0100.05320.92
5.5.330.0230.06320.95
5.5.320.0330.04720.93
5.5.310.0200.05020.97
5.5.300.0130.05720.82
5.5.290.0270.06320.86
5.5.280.0300.07320.93
5.5.270.0230.05020.91
5.5.260.0170.05720.83
5.5.250.0100.06720.53
5.5.240.0100.06020.35
5.5.230.0070.06720.30
5.5.220.0170.06320.33
5.5.210.0270.04020.21
5.5.200.0100.06020.27
5.5.190.0170.05320.14
5.5.180.0070.06720.20
5.5.160.0130.05720.26
5.5.150.0200.05020.28
5.5.140.0270.04020.30
5.5.130.0200.05020.22
5.5.120.0230.04320.24
5.5.110.0170.05320.12
5.5.100.0170.05320.13
5.5.90.0130.05320.16
5.5.80.0100.05720.09
5.5.70.0170.05720.15
5.5.60.0300.04719.97
5.5.50.0030.07020.21
5.5.40.0230.05020.05
5.5.30.0230.05320.14
5.5.20.0200.05720.05
5.5.10.0200.05320.05
5.5.00.0170.06020.07

preferences:
34.45 ms | 401 KiB | 5 Q