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); //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.0120.00618.18
8.3.50.0110.00319.68
8.3.40.0070.00718.66
8.3.30.0120.00318.60
8.3.20.0080.00020.33
8.3.10.0040.00421.60
8.3.00.0040.00420.71
8.2.180.0040.01118.66
8.2.170.0040.01122.96
8.2.160.0100.00319.10
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00420.57
8.2.120.0060.00326.35
8.2.110.0060.00321.05
8.2.100.0080.00417.80
8.2.90.0050.00319.30
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0040.00419.21
8.2.50.0040.00418.10
8.2.40.0000.00820.55
8.2.30.0050.00319.16
8.2.20.0040.00417.83
8.2.10.0040.00417.98
8.2.00.0090.00018.12
8.1.280.0170.00325.92
8.1.270.0060.00323.96
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0040.00419.59
8.1.230.0090.00317.70
8.1.220.0030.00617.78
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00617.23
8.1.180.0030.00618.10
8.1.170.0090.00018.64
8.1.160.0000.00718.88
8.1.150.0000.00718.84
8.1.140.0040.00419.48
8.1.130.0000.00817.66
8.1.120.0040.00417.45
8.1.110.0030.00517.32
8.1.100.0080.00017.46
8.1.90.0040.00417.38
8.1.80.0080.00017.47
8.1.70.0050.00317.40
8.1.60.0000.01017.56
8.1.50.0040.00417.49
8.1.40.0040.00417.55
8.1.30.0040.00417.56
8.1.20.0070.00017.54
8.1.10.0030.00617.46
8.1.00.0030.00617.47
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0040.00418.50
8.0.270.0030.00317.25
8.0.260.0000.00717.16
8.0.250.0030.00316.93
8.0.240.0030.00616.96
8.0.230.0030.00316.98
8.0.220.0000.00716.86
8.0.210.0030.00616.84
8.0.200.0000.00616.90
8.0.190.0040.00416.96
8.0.180.0040.00416.89
8.0.170.0040.00416.96
8.0.160.0080.00016.88
8.0.150.0000.00716.73
8.0.140.0000.01216.86
8.0.130.0030.00313.34
8.0.120.0060.00316.82
8.0.110.0040.00416.79
8.0.100.0080.00016.76
8.0.90.0040.00416.82
8.0.80.0060.01016.79
8.0.70.0000.00816.73
8.0.60.0000.00716.94
8.0.50.0000.00716.69
8.0.30.0100.00817.02
8.0.20.0120.00717.40
8.0.10.0040.00717.07
8.0.00.0080.00816.58
7.4.330.0000.00515.08
7.4.320.0000.00616.59
7.4.300.0000.00716.47
7.4.290.0000.00716.50
7.4.280.0040.00416.45
7.4.270.0030.00316.48
7.4.260.0040.00416.58
7.4.250.0000.00716.55
7.4.240.0040.00416.49
7.4.230.0080.00016.66
7.4.220.0090.01016.62
7.4.210.0050.01116.48
7.4.200.0080.00016.54
7.4.160.0100.01316.54
7.4.150.0120.00617.40
7.4.140.0140.00717.86
7.4.130.0090.00816.60
7.4.120.0100.01016.65
7.4.110.0160.00616.43
7.4.100.0120.00916.42
7.4.90.0150.00316.58
7.4.80.0090.01219.39
7.4.70.0120.00916.56
7.4.60.0090.00916.38
7.4.50.0060.00616.38
7.4.40.0060.01216.25
7.4.30.0140.00416.71
7.4.00.0090.00815.04
7.3.330.0000.00613.25
7.3.320.0000.00513.20
7.3.310.0000.00716.46
7.3.300.0070.00016.32
7.3.290.0000.00716.25
7.3.280.0090.00916.24
7.3.270.0120.00617.40
7.3.260.0110.00616.42
7.3.250.0110.00616.35
7.3.240.0060.01416.28
7.3.230.0070.01016.39
7.3.210.0090.00616.30
7.3.200.0070.01016.54
7.3.190.0000.01616.33
7.3.180.0100.00716.66
7.3.170.0080.00916.37
7.3.160.0120.00916.32
7.3.120.0030.01615.05
7.3.110.0100.00715.04
7.3.100.0110.00314.70
7.3.90.0030.01314.68
7.3.80.0070.00414.76
7.3.70.0120.00314.75
7.3.60.0070.01014.98
7.3.50.0070.00714.95
7.3.40.0030.00914.82
7.3.30.0110.00414.71
7.3.20.0030.00916.41
7.3.10.0090.00016.51
7.3.00.0090.00616.75
7.2.330.0140.00316.75
7.2.320.0070.01416.75
7.2.310.0110.00816.75
7.2.300.0100.00716.51
7.2.290.0070.01716.53
7.2.250.0150.00315.16
7.2.240.0100.01014.94
7.2.230.0070.01015.01
7.2.220.0030.00915.03
7.2.210.0000.01315.24
7.2.200.0110.00715.02
7.2.190.0100.00314.95
7.2.180.0000.01914.64
7.2.170.0060.00915.02
7.2.60.0130.00016.92
7.2.00.0060.00919.20
7.1.330.0030.01015.86
7.1.320.0070.00315.54
7.1.310.0040.01115.85
7.1.300.0110.00315.81
7.1.290.0070.00715.78
7.1.280.0030.01215.73
7.1.270.0080.00415.88
7.1.260.0070.01015.89
7.1.200.0000.01415.80
7.1.100.0070.00718.01
7.1.70.0080.00017.17
7.1.60.0000.01416.96
7.1.00.0000.08022.31
7.0.200.0070.00716.64
7.0.70.0070.06319.95
7.0.60.0200.05320.03
7.0.50.0230.05020.27
7.0.40.0200.05720.30
7.0.30.0070.06720.27
7.0.20.0170.06320.38
7.0.10.0200.06720.26
7.0.00.0130.06020.30
5.6.280.0130.06721.10
5.6.220.0200.05320.61
5.6.210.0170.05320.61
5.6.200.0170.05721.09
5.6.190.0270.04721.15
5.6.180.0200.05321.02
5.6.170.0200.05321.13
5.6.160.0100.06721.09
5.6.150.0100.06021.08
5.6.140.0100.06021.06
5.6.130.0100.06721.07
5.6.120.0230.06321.19
5.6.110.0300.07721.12
5.6.100.0170.05721.12
5.6.90.0170.06021.05
5.6.80.0100.06020.43
5.6.70.0200.05020.46
5.6.60.0130.05320.48
5.6.50.0170.05320.46
5.6.40.0170.05020.41
5.6.30.0130.05320.50
5.6.20.0100.05720.44
5.6.10.0200.04720.43
5.6.00.0100.05720.52
5.5.360.0100.06720.40
5.5.350.0170.05720.58
5.5.340.0130.05720.95
5.5.330.0170.06020.95
5.5.320.0170.06020.71
5.5.310.0100.06320.77
5.5.300.0100.06020.91
5.5.290.0170.05720.93
5.5.280.0130.07720.86
5.5.270.0270.06320.82
5.5.260.0130.06020.65
5.5.250.0100.06020.78
5.5.240.0330.04020.30
5.5.230.0200.05320.32
5.5.220.0200.04720.25
5.5.210.0100.05720.22
5.5.200.0170.05020.21
5.5.190.0170.05320.12
5.5.180.0200.05020.19
5.5.160.0200.04720.18
5.5.150.0130.05720.25
5.5.140.0170.05020.13
5.5.130.0170.05320.25
5.5.120.0000.06720.02
5.5.110.0330.04720.25
5.5.100.0170.07320.23
5.5.90.0170.06020.06
5.5.80.0230.04720.07
5.5.70.0200.05020.11
5.5.60.0130.05320.20
5.5.50.0170.05020.05
5.5.40.0100.05720.16
5.5.30.0200.05320.14
5.5.20.0130.05720.09
5.5.10.0100.05720.07
5.5.00.0200.05020.01

preferences:
49.79 ms | 400 KiB | 5 Q