3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mostrarTabla($fid, $alert) { $flights = new Flights; $aircrafts = $flights->getAircrafts(); $products = $flights->getProducts(); $cities = $flights->getFlightDetails($fid); $check = $flights->checkId($fid); $selAircraft = "<select name='aircraft' id='aircraft' onchange=\"calculate('aircraft','" . $check['id'] . "',this.value)\"><option value=''>Aircraft</option>"; foreach ($aircrafts as $rc => $rv) { if ($rv['id'] === $check['aircraftType']) { $selAircraft .= "<option value='" . $rv['id'] . "' selected='selected'>" . $rv['model'] . "</option>"; } else { $selAircraft .= "<option value='" . $rv['id'] . "'>" . $rv['model'] . "</option>"; } } $selAircraft .="</select>"; $line1 = "<tr><td style='border:1px solid black;'>" . $selAircraft . "</td>" . "<td style='border:1px solid black;'>ETA</td>"; foreach ($cities as $r => $t) { if ($t['eta'] === "00:00:00") { $eta = ""; } else { $hora = explode(":", $t['eta']); $h = $hora[0]; $m = $hora[1]; $hf = $h . ":" . $m; $eta = $hf; } if ($t['row'] === "1") { $line1 .= "<td style='border:1px solid black;' ></td>"; } else { $line1 .= "<td style='border:1px solid black;' > <input type='text' name='eta-" . $t['row'] . "' id='eta-" . $t['row'] . "' value='" . $eta . "' size='5' readonly='readonly' /></td>"; } } $line1 .="</tr>"; $line2 = "<tr><td style='border:1px solid black;'>" . "<input type='text' size='5' name='registration' placeholder='Registration' onblur=\"saveForm('registration'," . $check['id'] . ",this.value,0);\" value='" . $check['registration'] . "'/></td>" . "<td style='border:1px solid black;'>Airport</td>"; foreach ($cities as $r => $t) { $line2 .= "<td style='border:1px solid black;'>" . "<input type='text' name='aep-" . $t['row'] . "' id='aep-" . $t['row'] . "' onblur=\"calculate('aep-" . $t['row'] . "'," . $check['id'] . ",this.value)\" value='" . $t['aep'] . "' size='5'/>" . "</td>"; } $line2 .="</tr>"; $line3 = "<tr><td style='border:1px solid black;'>CREW</td>" . "<td style='border:1px solid black;'>ETD</td>"; foreach ($cities as $r => $t) { if ($t['etd'] === "00:00:00") { $etd = ""; } else { $hora = explode(":", $t['etd']); $h = $hora[0]; $m = $hora[1]; $hf = $h . ":" . $m; $etd = $hf; } if ($t['row'] === "1") { $line3 .= "<td style='border:1px solid black;'>" . "<input type='text' name='etd-" . $t['row'] . "' id='etd-" . $t['row'] . "' onblur=\"calculate('etd-" . $t['row'] . "'," . $check['id'] . ",this.value)\" value='" . $etd . "' size='5'/>" . "</td>"; } else { $line3 .= "<td style='border:1px solid black;'>" . "<input type='text' name='etd-" . $t['row'] . "' id='etd-" . $t['row'] . "' readonly='readonly' value='" . $etd . "' size='5'/>" . "</td>"; } } $line3 .="</tr>"; $line4 = "<tr><td style='border:1px solid black;'>" . "<input type='text' size='5' name='crew1Name' placeholder='Crew Name' onblur=\"saveForm('crew1Name'," . $check['id'] . ",this.value,0);\" value='" . $check['crew1Name'] . "'/></td>" . "<td style='border:1px solid black;'>PRODUCT</td>"; foreach ($cities as $r => $t) { $selproducts = "<select name='products-" . $t['row'] . "' id='products' onchange=\"saveForm('products'," . $check['id'] . ",this.value," . $t['row'] . ");\"><option value=''>Select</option>"; foreach ($products as $y => $u) { if($u['id'] === $t['products']){ $selproducts .= "<option value='" . $u['id'] . "' selected='selected'>" . $u['product'] . "</option>"; }else { $selproducts .= "<option value='" . $u['id'] . "'>" . $u['product'] . "</option>"; } } $selproducts .="</select>"; $line4 .= "<td style='border:1px solid black;'>" . $selproducts . "</td>"; } $line4 .="</tr>"; $line5 = "<tr><td style='border:1px solid black;'>" . "<input type='text' size='5' name='crew2Name' placeholder='Crew Name' onblur=\"saveForm('crew2Name'," . $check['id'] . ",this.value,0);\" value='" . $check['crew2Name'] . "'/></td>" . "<td style='border:1px solid black;'>CLIENT</td>"; foreach ($cities as $r => $t) { $line5 .= "<td style='border:1px solid black;'> <input type='text' name='client-" . $t['row'] . "' size='5' placeholder='Client' onblur=\"saveForm('client'," . $check['id'] . ",this.value," . $t['row'] . ");\" value='" . $t['client'] . "'/></td>"; } $line5 .="</tr>"; $line6 = "<tr><td style='border:1px solid black;'>" . "<input type='text' size='5' name='crew3Name' placeholder='Crew Name' onblur=\"saveForm('crew3Name'," . $check['id'] . ",this.value,0);\" value='" . $check['crew3Name'] . "'/></td>" . "<td style='border:1px solid black;'>FLT #s</td>"; foreach ($cities as $r => $t) { $line6 .= "<td style='border:1px solid black;'>" . "<input type='text' size='5' name='status-" . $t['row'] . "' onblur=\"saveForm('status'," . $check['id'] . ",this.value,".$t['row'].");\" placeholder='Status' value='" . $t['status'] . "' /></td>"; } $line6 .="</tr>"; $line7 = "<tr><td style='border:1px solid black;'> <input type='text' size='5' name='crew4Name' placeholder='Crew Name' onblur=\"saveForm('crew4Name'," . $check['id'] . ",this.value,0);\" value='" . $check['crew4Name'] . "'/></td> <td style='border:1px solid black;'>Turn time</td>"; foreach ($cities as $r => $t) { if ($t['turntime'] === "") { $turntime = "0"; } else { $turntime = $t['turntime']; } if ($t['row'] === "1") { $line7 .= "<td style='border:1px solid black;' ></td>"; } else { $line7 .= "<td style='border:1px solid black;' >" . "<input type='text' size='5' name='turntime-" . $t['row'] . "' onblur=\"calculate('turnTime-" . $t['row'] . "'," . $check['id'] . ",this.value)\" id='turnTime-" . $t['row'] . "' value='" . $turntime . "' /></td>"; } } $line7 .="</tr>"; if ($alert === "") { $cartel = ""; } else { $cartel = "<div id='alert'>" . $alert . "</div>"; } $tabla = $cartel . ' <div id="flight-' . $check['id'] . '"> <input type="hidden" id="planeModel" name="planeModel" value="' . $check['aircraftType'] . '" /> <table class="fixed" style="border: 1px solid black" id="flights"> <col width="10%" /><col width="10%" /><col width="10%" /> <col width="10%" /><col width="10%" /><col width="10%" /> <col width="10%" /><col width="10%" /><col width="10%" /> <col width="10%" /><col width="10%" /><col width="10%" /> <col width="10%" /><col width="10%" /><col width="10%" /> <col width="10%" /><col width="10%" />' . $line1 . $line2 . $line3 . $line4 . $line5 . $line6 . $line7 . ' </table></div>'; return $tabla; } function mostrar($ultimo){ $linea = "<pre>".print_r($ultimo).var_dump($ultimo)."</pre>"; return $linea; }

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.0180.00316.48
8.3.50.0100.01021.15
8.3.40.0120.00318.75
8.3.30.0110.00419.20
8.3.20.0040.00420.41
8.3.10.0040.00421.88
8.3.00.0080.00017.38
8.2.180.0060.00918.41
8.2.170.0070.00718.79
8.2.160.0060.00922.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.01122.18
8.2.110.0070.00419.51
8.2.100.0060.00617.63
8.2.90.0050.00319.09
8.2.80.0090.00317.97
8.2.70.0080.00017.38
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0000.00818.03
8.2.30.0000.00818.14
8.2.20.0050.00317.64
8.2.10.0040.00418.18
8.2.00.0000.00817.93
8.1.280.0150.00025.92
8.1.270.0060.00320.55
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.66
8.1.230.0090.00317.70
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0000.00917.10
8.1.190.0040.00417.36
8.1.180.0030.00518.10
8.1.170.0050.00518.48
8.1.160.0030.00521.97
8.1.150.0000.00718.95
8.1.140.0000.00917.53
8.1.130.0000.00817.64
8.1.120.0090.00017.54
8.1.110.0070.00017.40
8.1.100.0000.00717.38
8.1.90.0040.00417.40
8.1.80.0000.00717.35
8.1.70.0030.00417.44
8.1.60.0030.00617.61
8.1.50.0000.00817.43
8.1.40.0000.00817.41
8.1.30.0040.00417.66
8.1.20.0050.00317.63
8.1.10.0000.00717.51
8.1.00.0060.00317.41
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.43
8.0.270.0030.00316.89
8.0.260.0030.00317.33
8.0.250.0060.00316.99
8.0.240.0040.00416.85
8.0.230.0050.00216.91
8.0.220.0000.00716.85
8.0.210.0040.00416.93
8.0.200.0000.00616.97
8.0.190.0040.00417.00
8.0.180.0080.00316.89
8.0.170.0050.00216.80
8.0.160.0040.00416.84
8.0.150.0050.00316.85
8.0.140.0000.00716.80
8.0.130.0000.00813.38
8.0.120.0090.00016.84
8.0.110.0060.00316.95
8.0.100.0000.00716.89
8.0.90.0000.00716.80
8.0.80.0150.00916.86
8.0.70.0000.00716.97
8.0.60.0040.00416.78
8.0.50.0000.00716.80
8.0.30.0090.01317.11
8.0.20.0120.00717.40
8.0.10.0000.00716.85
8.0.00.0060.01216.78
7.4.330.0000.00515.04
7.4.320.0060.00016.61
7.4.300.0060.00016.57
7.4.290.0030.00416.54
7.4.280.0090.00016.41
7.4.270.0030.00316.45
7.4.260.0040.00416.62
7.4.250.0000.00716.63
7.4.240.0040.00416.56
7.4.230.0000.00716.59
7.4.220.0130.00616.72
7.4.210.0080.00816.60
7.4.200.0000.00716.27
7.4.160.0060.00916.29
7.4.150.0070.01017.40
7.4.140.0120.01017.86
7.4.130.0030.02116.54
7.4.120.0160.00516.38
7.4.110.0090.01516.46
7.4.100.0090.01516.45
7.4.90.0060.01116.35
7.4.80.0070.01019.39
7.4.70.0110.00716.40
7.4.60.0000.01816.39
7.4.50.0080.00016.64
7.4.40.0030.01316.41
7.4.30.0090.00916.36
7.4.00.0070.01015.08
7.3.330.0050.00013.36
7.3.320.0050.00013.23
7.3.310.0000.00816.17
7.3.300.0050.00316.35
7.3.290.0000.00716.18
7.3.280.0080.01016.31
7.3.270.0090.01017.40
7.3.260.0140.00316.43
7.3.240.0120.00616.44
7.3.230.0100.01316.50
7.3.210.0140.00416.28
7.3.200.0100.00719.39
7.3.190.0080.00816.43
7.3.180.0100.01316.29
7.3.170.0130.00316.33
7.3.160.0070.01016.32
7.3.10.0130.00316.00
7.3.00.0040.01116.20
7.2.330.0120.00616.66
7.2.320.0070.01416.63
7.2.310.0070.01016.38
7.2.300.0080.00816.53
7.2.290.0120.00716.62
7.2.130.0130.00016.44
7.2.120.0120.01216.10
7.2.110.0100.01116.63
7.2.100.0070.01416.34
7.2.90.0170.00716.11
7.2.80.0090.01516.09
7.2.70.0170.00316.36
7.2.60.0150.00716.39
7.2.50.0190.00316.35
7.2.40.0210.00016.38
7.2.30.0040.01116.43
7.2.20.0140.01116.34
7.2.10.0130.01416.25
7.2.00.0100.01218.05
7.1.250.0110.01415.08
7.1.200.0070.00715.55
7.1.100.0030.00917.91
7.1.70.0070.00716.91
7.1.60.0070.01119.59
7.1.50.0090.00616.82
7.1.00.0030.07722.41
7.0.200.0000.00816.66
7.0.100.0100.04020.10
7.0.90.0070.04720.05
7.0.80.0070.04020.04
7.0.70.0000.04020.02
7.0.60.0100.03719.91
7.0.50.0030.04320.41
7.0.40.0070.03320.00
7.0.30.0000.06020.19
7.0.20.0070.04020.09
7.0.10.0070.04020.05
7.0.00.0070.03320.10
5.6.280.0000.07021.19
5.6.250.0030.06020.78
5.6.240.0070.06320.73
5.6.230.0030.04320.56
5.6.220.0030.04320.62
5.6.210.0100.03320.64
5.6.200.0070.03321.02
5.6.190.0030.04321.00
5.6.180.0000.04721.08
5.6.170.0070.04321.14
5.6.160.0070.04721.16
5.6.150.0030.05021.05
5.6.140.0030.08021.07
5.6.130.0070.04021.14
5.6.120.0070.04321.05
5.6.110.0030.05021.11
5.6.100.0030.04721.21
5.6.90.0070.04721.09
5.6.80.0030.04020.38
5.6.70.0000.04320.50
5.6.60.0030.03320.60
5.6.50.0030.03320.56
5.6.40.0000.04020.50
5.6.30.0030.03320.48
5.6.20.0030.03320.46
5.6.10.0000.03720.41
5.6.00.0030.04720.57
5.5.380.0000.08720.42
5.5.370.0100.03720.57
5.5.360.0070.04320.40
5.5.350.0030.03320.49
5.5.340.0130.03720.86
5.5.330.0070.04720.89
5.5.320.0000.03720.98
5.5.310.0030.04720.86
5.5.300.0170.07020.98
5.5.290.0030.04720.93
5.5.280.0030.04320.87
5.5.270.0030.04320.85
5.5.260.0030.04720.84
5.5.250.0030.04020.64
5.5.240.0100.03320.32
5.5.230.0030.03720.21
5.5.220.0070.03720.17
5.5.210.0070.03020.26
5.5.200.0030.04020.19
5.5.190.0070.03720.27
5.5.180.0030.04020.31
5.5.160.0070.03020.33
5.5.150.0000.04020.23
5.5.140.0000.03720.20
5.5.130.0030.04020.28
5.5.120.0070.03320.23
5.5.110.0030.04020.31
5.5.100.0070.03720.11
5.5.90.0100.07320.10
5.5.80.0030.05020.21
5.5.70.0030.04020.20
5.5.60.0130.06320.20
5.5.50.0030.03720.14
5.5.40.0030.08319.99
5.5.30.0030.04320.12
5.5.20.0000.06720.11
5.5.10.0100.07320.10
5.5.00.0070.03720.02
5.4.450.0000.05319.28
5.4.440.0000.04319.16
5.4.430.0070.04019.26
5.4.420.0000.04319.46
5.4.410.0030.04019.33
5.4.400.0070.03318.91
5.4.390.0000.04318.88
5.4.380.0100.03018.89
5.4.370.0030.03019.20
5.4.360.0070.02718.96
5.4.350.0000.03718.85
5.4.340.0000.03319.14
5.4.320.0000.03319.09
5.4.310.0000.04719.16
5.4.300.0030.04018.89
5.4.290.0000.04319.14
5.4.280.0100.02719.05
5.4.270.0030.03019.03
5.4.260.0100.03319.16
5.4.250.0170.05018.87
5.4.240.0070.05718.94
5.4.230.0100.03019.20
5.4.220.0100.05319.02
5.4.210.0070.03319.04
5.4.200.0070.03018.96
5.4.190.0030.05718.85
5.4.180.0070.03318.84
5.4.170.0130.03019.15
5.4.160.0000.04019.14
5.4.150.0030.03719.10
5.4.140.0070.06316.48
5.4.130.0030.03716.54
5.4.120.0070.03016.51
5.4.110.0030.05316.32
5.4.100.0030.07716.56
5.4.90.0130.04316.48
5.4.80.0070.04016.55
5.4.70.0030.03316.52
5.4.60.0000.05016.54
5.4.50.0030.03716.37
5.4.40.0000.04016.31
5.4.30.0100.02716.37
5.4.20.0070.03016.50
5.4.10.0100.04316.44
5.4.00.0000.04015.83

preferences:
67.17 ms | 401 KiB | 5 Q