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%5B0%5D%5Bfrom%5D=1&surcharge_tier%5B0%5D%5Brate%5D=3&surcharge_tier%5B1%5D%5Bfrom%5D=2&surcharge_tier%5B1%5D%5Brate%5D=4&plan_no%5B0%5D%5Bplan_nos%5D=asd&schedule%5B0%5D%5Bschedule_name%5D=TestSchedule1&schedule%5B0%5D%5Bcurrency_cd%5D=usd&submit=Agree+%26+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.70.0130.01018.30
8.3.60.0070.01116.75
8.3.50.0260.00821.98
8.3.40.0080.00818.97
8.3.30.0150.00319.04
8.3.20.0000.00920.40
8.3.10.0040.00421.84
8.3.00.0040.00417.50
8.2.190.0120.00316.58
8.2.180.0100.01016.50
8.2.170.0030.01022.96
8.2.160.0030.01020.54
8.2.150.0000.00825.66
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0080.00019.78
8.2.110.0060.00319.27
8.2.100.0130.00017.63
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0000.00920.00
8.2.30.0030.00518.06
8.2.20.0000.00817.78
8.2.10.0000.00818.16
8.2.00.0000.00718.09
8.1.280.0120.00325.92
8.1.270.0060.00920.37
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0090.00020.94
8.1.230.0070.00717.48
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0050.00317.38
8.1.180.0050.00318.10
8.1.170.0000.00918.54
8.1.160.0020.00521.97
8.1.150.0000.00718.88
8.1.140.0070.00017.48
8.1.130.0000.00717.80
8.1.120.0000.00717.38
8.1.110.0000.00717.49
8.1.100.0080.00017.46
8.1.90.0050.00317.38
8.1.80.0040.00417.52
8.1.70.0070.00017.49
8.1.60.0060.00317.63
8.1.50.0030.00617.54
8.1.40.0030.00617.54
8.1.30.0040.00417.52
8.1.20.0080.00017.63
8.1.10.0000.00917.66
8.1.00.0040.00417.45
8.0.300.0050.00218.77
8.0.290.0040.00416.63
8.0.280.0040.00418.50
8.0.270.0030.00317.36
8.0.260.0000.00817.17
8.0.250.0030.00317.02
8.0.240.0030.00617.00
8.0.230.0070.00016.91
8.0.220.0000.00716.94
8.0.210.0000.00716.91
8.0.200.0000.00816.93
8.0.190.0040.00716.86
8.0.180.0040.00416.84
8.0.170.0030.00616.91
8.0.160.0030.00516.82
8.0.150.0040.00416.99
8.0.140.0080.00316.86
8.0.130.0060.00013.39
8.0.120.0000.00816.90
8.0.110.0070.00016.86
8.0.100.0000.00716.81
8.0.90.0030.00516.91
8.0.80.0110.00716.87
8.0.70.0040.00416.99
8.0.60.0040.00416.88
8.0.50.0000.00816.95
8.0.30.0130.00617.23
8.0.20.0090.01117.40
8.0.10.0000.00716.84
8.0.00.0120.01016.80
7.4.330.0050.00015.09
7.4.320.0030.00316.48
7.4.300.0030.00316.45
7.4.290.0000.00716.55
7.4.280.0040.00416.56
7.4.270.0000.00716.55
7.4.260.0060.00316.55
7.4.250.0030.00516.39
7.4.240.0050.00316.66
7.4.230.0000.00716.54
7.4.220.0100.01016.48
7.4.210.0040.01116.50
7.4.200.0030.00616.52
7.4.160.0100.00716.57
7.4.150.0130.00517.40
7.4.140.0150.00717.86
7.4.130.0100.01016.40
7.4.120.0100.01216.56
7.4.110.0190.00016.44
7.4.100.0140.00516.60
7.4.90.0000.01916.41
7.4.80.0060.01819.39
7.4.70.0090.01216.61
7.4.60.0120.00616.38
7.4.50.0000.00616.39
7.4.40.0100.00716.38
7.4.30.0080.01216.48
7.4.00.0060.00915.23
7.3.330.0000.00513.17
7.3.320.0030.00313.21
7.3.310.0070.00016.07
7.3.300.0040.00416.32
7.3.290.0050.01116.27
7.3.280.0080.01016.36
7.3.270.0080.00817.40
7.3.260.0120.00816.74
7.3.240.0160.00316.41
7.3.230.0070.01016.68
7.3.210.0100.01016.23
7.3.200.0100.01019.39
7.3.190.0110.01116.43
7.3.180.0100.01016.41
7.3.170.0110.01116.36
7.3.160.0070.01016.27
7.2.330.0110.00816.77
7.2.320.0070.01116.38
7.2.310.0120.00616.76
7.2.300.0030.01416.38
7.2.290.0090.00916.89
7.2.00.0030.00919.29
7.1.100.0040.00818.13
7.1.70.0030.01417.23
7.1.60.0000.01419.59
7.1.50.0100.01316.76
7.1.00.0070.07322.58
7.0.200.0100.00016.50
7.0.60.0170.04320.03
7.0.50.0100.07717.85
7.0.40.0070.05319.98
7.0.30.0300.07720.13
7.0.20.0170.06320.04
7.0.10.0400.07020.25
7.0.00.0130.03320.12
5.6.280.0030.07021.09
5.6.210.0100.07320.70
5.6.200.0030.06718.09
5.6.190.0030.05320.21
5.6.180.4000.05020.35
5.6.170.0300.08020.67
5.6.160.0070.08720.40
5.6.150.0070.06018.21
5.6.140.0030.05018.08
5.6.130.0070.05318.11
5.6.120.0100.08321.15
5.6.110.0100.03721.02
5.6.100.0170.07321.12
5.6.90.0070.08320.89
5.6.80.0130.06020.43
5.6.70.4500.03320.36
5.5.350.0170.08320.43
5.5.340.0030.08318.02
5.5.330.0070.04020.15
5.5.320.0370.05020.18
5.5.310.0170.04720.34
5.5.300.0130.07317.88
5.5.290.0000.04317.91
5.5.280.0030.04020.79
5.5.270.0070.08720.89
5.5.260.0070.04720.85
5.5.250.0100.07020.77
5.5.240.0230.05320.27
5.4.450.0570.05019.55
5.4.440.0930.06019.47
5.4.430.0930.00019.66
5.4.420.0670.00019.36
5.4.410.0730.00019.38
5.4.400.0700.00019.34
5.4.390.0770.00019.09
5.4.380.0900.00019.16
5.4.370.0830.00019.16
5.4.360.0700.00019.08
5.4.350.0970.00019.30
5.4.340.1100.00019.33
5.4.320.0800.00019.28
5.4.310.0700.00019.31
5.4.300.0800.00019.30
5.4.290.0700.00019.22
5.4.280.0800.00019.12
5.4.270.0670.00019.08
5.4.260.0770.00018.82
5.4.250.0670.00019.21
5.4.240.0700.00019.16
5.4.230.0900.00019.11
5.4.220.0700.00018.93
5.4.210.0900.00019.00
5.4.200.0830.00016.57
5.4.190.0870.00019.27
5.4.180.0730.00018.94
5.4.170.0700.00019.17
5.4.160.0670.00018.92
5.4.150.0730.00018.86
5.4.140.0900.00016.23
5.4.130.0630.00016.51
5.4.120.0600.00016.52
5.4.110.0630.00016.35
5.4.100.0770.00016.41
5.4.90.0930.00016.47
5.4.80.0870.00016.35
5.4.70.0800.00016.48
5.4.60.0770.00016.47
5.4.50.0800.00016.16
5.4.40.0830.00016.50
5.4.30.0600.00016.48
5.4.20.0600.00016.38
5.4.10.0600.00016.51
5.4.00.0830.00015.87
5.3.290.0700.00014.57
5.3.280.0870.00014.52
5.3.270.0900.00014.59
5.3.260.0800.00014.48
5.3.250.0800.00014.63
5.3.240.0670.00014.66
5.3.230.0770.00014.52
5.3.220.0900.00014.62
5.3.210.0930.00014.62
5.3.200.0830.00014.38
5.3.190.0770.00014.48
5.3.180.0870.00014.59
5.3.170.0930.00014.50
5.3.160.0900.00014.41
5.3.150.0900.00014.44
5.3.140.0900.00014.59
5.3.130.0900.00014.42
5.3.120.0900.00014.55
5.3.110.0870.00014.50
5.3.100.0670.00013.92
5.3.90.0800.00013.89
5.3.80.0800.00013.90
5.3.70.0800.00013.92
5.3.60.0770.00014.05
5.3.50.0630.00013.80
5.3.40.0870.00013.77
5.3.30.0630.00013.80
5.3.20.0830.00013.65
5.3.10.0630.00013.52
5.3.00.0700.00013.52
5.2.170.0500.00011.07
5.2.160.0530.00011.17
5.2.150.0530.00011.18
5.2.140.0530.00011.25
5.2.130.0500.00011.07
5.2.120.0630.00011.03
5.2.110.0570.00011.02
5.2.100.0500.00011.05
5.2.90.0500.00011.00
5.2.80.0530.00011.07
5.2.70.0530.00010.92
5.2.60.0500.00010.92
5.2.50.0500.00011.05
5.2.40.0500.00010.85
5.2.30.0630.00010.84
5.2.20.0500.00011.08
5.2.10.0670.00010.79
5.2.00.0670.00010.64
5.1.60.0570.00010.10
5.1.50.0570.00010.02
5.1.40.0600.0009.92
5.1.30.0630.00010.41
5.1.20.0470.00010.44
5.1.10.0570.0009.99
5.1.00.0470.0009.98
5.0.50.0370.0008.51
5.0.40.0330.0008.35
5.0.30.0570.0008.23
5.0.20.0430.0008.32
5.0.10.0400.0008.20
5.0.00.0470.0008.19
4.4.90.0270.0005.82
4.4.80.0270.0005.84
4.4.70.0270.0005.94
4.4.60.0270.0005.79
4.4.50.0300.0005.82
4.4.40.0500.0005.86
4.4.30.0300.0005.89
4.4.20.0270.0005.89
4.4.10.0330.0005.84
4.4.00.0470.0005.81
4.3.110.0330.0005.83
4.3.100.0370.0005.87
4.3.90.0270.0005.72
4.3.80.0500.0005.86
4.3.70.0270.0005.80
4.3.60.0270.0005.70
4.3.50.0330.0005.72
4.3.40.0500.0005.73
4.3.30.0330.0004.56
4.3.20.0330.0004.59
4.3.10.0330.0004.39
4.3.00.0070.01315.53

preferences:
31.81 ms | 401 KiB | 5 Q