3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'client_no=100&auth_key=stEKy9vvN9mKEPTeAdNkfeuUE5CGHknB&rest_call=create_surcharge&cat=admintools-api&surcharge_name=mysurcharge1&description=description123&ext_description=description1234&currency_cd=usd&surcharge_type_cd=F&inline_offset_ind=I&apply_b4_or_after_discount_cd=B&scope_no=1&surcharge_tier[0][from]=1&surcharge_tier[0][rate]=3&plan_no[0][plan_nos]=asd&schedule[0][schedule_name]=TestSchedule1&schedule[0][currency_cd]=usd&submit=Agree & Execute'; parse_str($string, $output); var_dump($output); $rowObjectExample = ''; foreach($output as $name => $value) { if(isset($output[$name])) { if(is_array($value)) { $i = 0; $length = count($value); foreach($value as $key=>$val) { $i++; $rowObjectExample .= $name.'_row '.$name.'Row'; if($length > 1) { $rowObjectExample .= ($i <= $length ? $key : ''); } else if(is_array($val)) { $rowObjectExample .= ($i <= count($val) ? $key : ''); } $rowObjectExample .= ' = new '.$name.'_row()'.";\n\t"; if(is_array($val)) { foreach($val as $k=>$v) { if(is_array($v)) { $n = 0; $len = count($v); foreach ($v as $row=>$column) { if(is_array($column)) { $rowObjectExample .= $k.'_row '.$k.'Row'.$row.' = new '.$k.'_row()'."\n\t"; $n++; foreach($column as $r=>$c) { $rowObjectExample .= $k.'Row'; if($len > 1) { $rowObjectExample .= ($n <= $len ? $row : ''); } $rowObjectExample .= '.'.$r.' = '; $rowObjectExample .= (empty($c) ? 'null' : $c)."\n\t"; } } } } else { $rowObjectExample .= $name.'Row'; $rowObjectExample .= ($i <= count($val) ? $key : ''); $rowObjectExample .= '.'.$k.' = '.$v."\n\t"; } } } } } } } var_dump($rowObjectExample);

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.0160.00618.43
8.3.50.0200.00922.11
8.3.40.0070.01018.71
8.3.30.0090.00619.02
8.3.20.0000.00820.16
8.3.10.0000.00921.77
8.3.00.0080.00017.50
8.2.180.0090.00916.75
8.2.170.0080.00818.90
8.2.160.0120.00322.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0050.00226.16
8.2.120.0000.00820.69
8.2.110.0070.01019.39
8.2.100.0080.00417.78
8.2.90.0000.00819.17
8.2.80.0080.00017.97
8.2.70.0000.00917.50
8.2.60.0030.00618.00
8.2.50.0080.00018.10
8.2.40.0000.00818.14
8.2.30.0000.00818.05
8.2.20.0030.00617.67
8.2.10.0030.00618.22
8.2.00.0000.00818.14
8.1.280.0060.00925.92
8.1.270.0080.00020.39
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00322.75
8.1.230.0070.00717.70
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0040.00417.35
8.1.180.0080.00018.10
8.1.170.0000.00818.59
8.1.160.0040.00421.96
8.1.150.0050.00218.93
8.1.140.0030.00517.39
8.1.130.0030.00317.66
8.1.120.0000.00717.50
8.1.110.0040.00417.50
8.1.100.0040.00417.54
8.1.90.0000.00817.49
8.1.80.0040.00417.53
8.1.70.0000.00717.39
8.1.60.0060.00317.59
8.1.50.0040.00417.49
8.1.40.0040.00417.49
8.1.30.0000.00817.66
8.1.20.0040.00417.63
8.1.10.0000.00817.45
8.1.00.0050.00317.56
8.0.300.0000.00818.77
8.0.290.0000.00816.88
8.0.280.0030.00318.45
8.0.270.0070.00017.24
8.0.260.0030.00317.29
8.0.250.0030.00317.03
8.0.240.0030.00616.96
8.0.230.0040.00416.91
8.0.220.0040.00416.94
8.0.210.0000.00716.82
8.0.200.0000.00617.00
8.0.190.0060.00316.92
8.0.180.0030.00517.00
8.0.170.0080.00016.94
8.0.160.0050.00216.93
8.0.150.0040.00416.84
8.0.140.0110.00016.79
8.0.130.0030.00313.36
8.0.120.0040.00416.88
8.0.110.0080.00016.89
8.0.100.0050.00316.87
8.0.90.0030.00617.00
8.0.80.0140.00416.93
8.0.70.0040.00416.82
8.0.60.0000.00816.96
8.0.50.0040.00416.81
8.0.30.0140.00517.33
8.0.20.0140.00617.40
8.0.10.0080.00017.10
8.0.00.0120.00816.77
7.4.330.0000.00515.09
7.4.320.0050.00316.54
7.4.300.0030.00316.64
7.4.290.0000.00716.65
7.4.280.0050.00216.58
7.4.270.0070.00016.54
7.4.260.0050.00316.55
7.4.250.0060.00316.48
7.4.240.0030.00416.60
7.4.230.0030.00316.66
7.4.220.0130.00316.56
7.4.210.0040.01116.64
7.4.200.0000.00816.74
7.4.160.0090.00616.46
7.4.150.0170.00017.40
7.4.140.0120.01017.86
7.4.130.0140.00616.53
7.4.120.0080.01016.43
7.4.110.0180.00616.72
7.4.100.0070.01016.44
7.4.90.0040.01516.68
7.4.80.0120.00619.39
7.4.70.0130.01316.61
7.4.60.0120.00416.47
7.4.50.0030.00316.43
7.4.40.0090.01316.50
7.4.30.0150.00516.66
7.4.00.0070.00714.98
7.3.330.0000.00613.21
7.3.320.0050.00013.05
7.3.310.0040.00416.42
7.3.300.0000.00716.20
7.3.290.0100.00416.28
7.3.280.0060.01016.27
7.3.270.0100.01017.40
7.3.260.0130.00716.23
7.3.240.0060.01216.43
7.3.230.0090.00916.39
7.3.210.0030.01716.44
7.3.200.0060.01219.39
7.3.190.0160.00216.56
7.3.180.0070.01016.23
7.3.170.0060.01616.53
7.3.160.0130.00616.32
7.3.10.0070.00716.36
7.3.00.0110.00316.83
7.2.330.0030.01416.45
7.2.320.0120.00916.78
7.2.310.0060.01316.71
7.2.300.0070.01016.79
7.2.290.0040.01416.80
7.2.130.0040.00716.93
7.2.120.0060.00617.00
7.2.110.0040.00716.98
7.2.100.0070.00416.85
7.2.90.0030.00616.75
7.2.80.0120.00017.04
7.2.70.0050.00517.03
7.2.60.0070.00717.02
7.2.50.0140.00316.96
7.2.40.0100.00317.07
7.2.30.0120.00016.92
7.2.20.0030.01016.65
7.2.10.0070.00417.03
7.2.00.0080.00518.13
7.1.250.0050.00515.80
7.1.100.0040.00717.98
7.1.70.0060.00916.93
7.1.60.0070.01019.59
7.1.50.0040.01817.08
7.1.00.0030.07722.54
7.0.200.0060.00316.48
7.0.60.0100.08719.81
7.0.50.0070.07017.69
7.0.40.0030.05320.20
7.0.30.0330.07720.11
7.0.20.0270.06320.30
7.0.10.0270.04720.00
7.0.00.0000.06020.33
5.6.280.0030.07321.09
5.6.210.0030.04320.70
5.6.200.0070.08718.15
5.6.190.0000.05020.27
5.6.180.4030.04320.49
5.6.170.0230.05720.49
5.6.160.0130.07720.61
5.6.150.0170.07018.07
5.6.140.0100.06318.18
5.6.130.0130.07318.22
5.6.120.0100.06320.99
5.6.110.0100.08320.98
5.6.100.0100.07721.14
5.6.90.0030.08321.04
5.6.80.0030.04020.41
5.6.70.0070.06720.41
5.5.350.0200.08320.33
5.5.340.0070.08317.93
5.5.330.0030.04320.29
5.5.320.0330.04020.30
5.5.310.0300.07720.50
5.5.300.0100.08317.87
5.5.290.0100.03317.98
5.5.280.0070.06020.81
5.5.270.0230.07020.89
5.5.260.0030.04720.90
5.5.250.0070.08020.51
5.5.240.0130.07320.27
5.4.450.0100.03019.49
5.4.440.0300.06719.25
5.4.430.0730.00019.54
5.4.420.0670.00019.25
5.4.410.0700.00019.02
5.4.400.0770.00018.93
5.4.390.0730.00018.84
5.4.380.0870.00019.04
5.4.370.0730.00019.22
5.4.360.0800.00019.04
5.4.350.0700.00019.22
5.4.340.0670.00019.21
5.4.320.0900.00018.93
5.4.310.0670.00019.11
5.4.300.0930.00018.93
5.4.290.0900.00019.09
5.4.280.0770.00018.93
5.4.270.0730.00019.21
5.4.260.0630.00019.21
5.4.250.0700.00019.18
5.4.240.0700.00019.15
5.4.230.0730.00019.24
5.4.220.0730.00019.21
5.4.210.0730.00018.83
5.4.200.0700.00016.60
5.4.190.0700.00019.19
5.4.180.0700.00018.91
5.4.170.0730.00018.83
5.4.160.0700.00018.91
5.4.150.0700.00018.99
5.4.140.0670.00016.14
5.4.130.0670.00016.54
5.4.120.0630.00016.52
5.4.110.0630.00016.23
5.4.100.0670.00016.56
5.4.90.0670.00016.41
5.4.80.0670.00016.36
5.4.70.0700.00016.49
5.4.60.0670.00016.16
5.4.50.0670.00016.20
5.4.40.0700.00016.40
5.4.30.0770.00016.38
5.4.20.0670.00016.38
5.4.10.0630.00016.29
5.4.00.0630.00016.02
5.3.290.0700.00014.70
5.3.280.0670.00014.45
5.3.270.0700.00014.63
5.3.260.0700.00014.46
5.3.250.0700.00014.57
5.3.240.0700.00014.49
5.3.230.0700.00014.47
5.3.220.0730.00014.60
5.3.210.0700.00014.46
5.3.200.0700.00014.46
5.3.190.0700.00014.62
5.3.180.0700.00014.50
5.3.170.0700.00014.43
5.3.160.0770.00014.52
5.3.150.0700.00014.43
5.3.140.0700.00014.47
5.3.130.0670.00014.40
5.3.120.0670.00014.61
5.3.110.0630.00014.40
5.3.100.0630.00014.03
5.3.90.0600.00014.06
5.3.80.0700.00014.05
5.3.70.0730.00013.97
5.3.60.0730.00013.87
5.3.50.0730.00013.89
5.3.40.0730.00014.00
5.3.30.0730.00013.85
5.3.20.0600.00013.54
5.3.10.0600.00013.53
5.3.00.0730.00013.57
5.2.170.0530.00011.18
5.2.160.0530.00011.12
5.2.150.0600.00010.97
5.2.140.0570.00011.07
5.2.130.0570.00011.05
5.2.120.0570.00011.07
5.2.110.0570.00011.07
5.2.100.0530.00011.14
5.2.90.0570.00011.18
5.2.80.0570.00011.04
5.2.70.0570.00010.98
5.2.60.0530.00011.07
5.2.50.0670.00010.88
5.2.40.0530.00010.91
5.2.30.0600.00011.09
5.2.20.0530.00010.83
5.2.10.0570.00010.82
5.2.00.0700.00010.90
5.1.60.0600.00010.01
5.1.50.0470.00010.17
5.1.40.0470.0009.92
5.1.30.0570.00010.34
5.1.20.0530.00010.32
5.1.10.0470.0009.98
5.1.00.0570.00010.09
5.0.50.0500.0008.72
5.0.40.0330.0008.36
5.0.30.0500.0008.41
5.0.20.0400.0008.16
5.0.10.0470.0008.36
5.0.00.0570.0008.11
4.4.90.0400.0005.86
4.4.80.0300.0005.79
4.4.70.0300.0005.93
4.4.60.0300.0005.88
4.4.50.0400.0005.80
4.4.40.0400.0005.78
4.4.30.0370.0005.78
4.4.20.0270.0005.87
4.4.10.0400.0005.88
4.4.00.0400.0005.98
4.3.110.0300.0005.77
4.3.100.0270.0005.82
4.3.90.0270.0005.70
4.3.80.0500.0005.79
4.3.70.0370.0005.70
4.3.60.0270.0005.79
4.3.50.0270.0005.68
4.3.40.0400.0005.77
4.3.30.0270.0004.57
4.3.20.0230.0004.52
4.3.10.0230.0004.39
4.3.00.0100.02015.53

preferences:
60.95 ms | 401 KiB | 5 Q