3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Include the database include ('../media/connect_mysql.php'); ### Konfiguration ### # Bitte passen Sie die folgenden Werte an, bevor Sie das Script benutzen! # An welche Adresse sollen die Mails gesendet werden? $strEmpfaenger = 'mail@hexdesign.de'; # Welche Adresse soll als Absender angegeben werden? # (Manche Hoster lassen diese Angabe vor dem Versenden der Mail ueberschreiben) $strFrom = '"Homepage Terra-Roxa" <terrarox@pt.lu>'; # Welchen Betreff sollen die Mails erhalten? $strSubject = 'Bestellung von Terra-Roxa Homepage'; # Zu welcher Seite soll als "Danke-Seite" weitergeleitet werden? # Wichtig: Sie muessen hier eine gueltige HTTP-Adresse angeben! $strReturnhtml = 'http://www.terra-roxa.com/media/danke.htm'; # Welche(s) Zeichen soll(en) zwischen dem Feldnamen und dem angegebenen Wert stehen? $strDelimiter = " : "; $ip=$_SERVER["REMOTE_ADDR"]; echo mysql_error(); ### Ende Konfiguration ### if($_POST) { $strMailtext = ""; $strMailtext .= "\n" . "Un ordre de " . $_POST["firma_rechnung"] . "\n" . "\n" . "Adresse De facturation \n" . "\n" . " Nom: " . $_POST["name_rechnung"] . "\n" . " Adresse: " . $_POST["strasse_rechnung"] . "\n" . " Code postal: " . $_POST["plz_rechnung"] . "\n" . " Ville: " . $_POST["ort_rechnung"] . "\n" . " Téléphone: " . $_POST["telefon_rechnung"] . "\n" . " Email: " . $_POST["email_rechnung"] . "\n" . "\n" . "Votre message: " . $_POST["message"] . "\n" . "\n" . "Adresse de livraison (si différente)\n" . "\n" . " Adresse: " . $_POST["strasse_lieferung"] . "\n" . " Code postal: " . $_POST["plz_lieferung"] . "\n" . " Ville: " . $_POST["ort_lieferung"] . "\n" . "\n" . "IP-Adresse: " . $ip . "\n" . "\n"; echo mysql_error(); while(list($strName,$value) = each($_POST)) { if(is_array($value)) { foreach($value as $value_array) { $strMailtext = str_replace("_", " ", $strMailtext); $strMailtext .= $strDelimiter."\n"; } } elseif ($value != '0') { unset($_POST["firma_rechnung"]); unset($_POST["name_rechnung"]); unset($_POST["strasse_rechnung"]); unset($_POST["plz_rechnung"]); unset($_POST["ort_rechnung"]); unset($_POST["telefon_rechnung"]); unset($_POST["email_rechnung"]); unset($_POST["message"]); unset($_POST["strasse_lieferung"]); unset($_POST["plz_lieferung"]); unset($_POST["ort_lieferung"]); $strMailtext = str_replace("_", " ", $strMailtext); $strMailtext .= $strName. " Pièces par colis " .$strDelimiter.$value. " carton(s) \n"; $strMailtext = str_replace("_", " ", $strMailtext); } } if(get_magic_quotes_gpc()) { $strMailtext = stripslashes($strMailtext); } mail($strEmpfaenger, $strSubject, $strMailtext, "From: ".$strFrom) or die("Die Mail konnte nicht versendet werden."); header("Location: $strReturnhtml"); exit; } $manufact = array("Biscuits Filet Bleu","Chocolat Schönenberger AG","Confiserie De Fries","Confiserie Mathez","Dimabel bvba","dwp e.g.","Ethiquable","Fair Naturally","Fair Squared GmbH","Fair Wein GmbH","Gepa","Idé Coffee Systems","KeyPharm Laboratories","Label Place","Maya Fair trade","Moulin J.P. Dieschburg","Natur'Inov","NJD COSMETICS","Oxfam Fair trade","Savonnerie Marius FABRE","Vermeiren Princeps"); $label = array("DWP","ECOcert","Fair+bio","Fairtrade","Gepa Fair+","Max Havelaar","Naturland Fair","Oxfam Fairtrade","Transfair"); $q = "SELECT a.product_id, a.product_sku, a.product_s_desc, a.product_special, a.product_name, a.product_packaging, b.product_id, b.product_price, b.shopper_group_id, c.product_id, c.manufacturer_id, d.manufacturer_id, d.mf_name, e.category_id, e.category_name, f.category_id, f.product_id FROM jos_vm_product AS a, jos_vm_product_price AS b, jos_vm_product_mf_xref AS c, jos_vm_manufacturer AS d, jos_vm_category AS e, jos_vm_product_category_xref AS f WHERE a.product_id = b.product_id AND a.product_id = f.product_id AND e.category_id = f.category_id AND b.product_id = c.product_id AND b.shopper_group_id = '5' AND NOT c.manufacturer_id = '186' AND c.manufacturer_id = d.manufacturer_id ORDER BY d.mf_name, e.category_name, b.product_id"; $result = mysql_query($q, $link); echo mysql_error(); $max = 50; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>Bestellformular Terra-Roxa</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> p { border-bottom: 2px solid #990000; background-color: #CCCCCC; padding: 0px; clear: both; } </style> <script type="text/javascript"> function berechnen() { erg = document.getElementById('$row[feld1]').value * document.getElementById('$row[feld2]').value; document.getElementById('$row[ergebnis]').innerHTML = erg; } </script> </head> <body> <form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post" name="autoSumForm"> <!-- Hier die eigentlichen Formularfelder eintragen. Die folgenden sind Beispielangaben. --> <hr align="left" color="#990000" size="2" width="550"> <table width="550" border="0" bgcolor="#CCCCCC"> <tr> <td colspan="2" height="30"><b>Adresse de facturation</b></td> </tr> <tr> <td align="left" width="200">Société:</td> <td align="left" width="220"><input type="text" size="30" name="firma_rechnung"></td> </tr> <tr> <td align="left" width="200">Votre nom:</td> <td align="left" width="220"><input type="text" size="30" name="name_rechnung"></td> </tr> <tr> <td align="left" width="200">Votre rue:</td> <td align="left" width="220"><input type="text" size="30" name="strasse_rechnung"></td> </tr> <tr> <td align="left" width="200">Votre code postal:</td> <td align="left" width="220"><input type="text" size="30" name="plz_rechnung" placeholder="12345"></td> </tr> <tr> <td align="left" width="200">Votre lieu:</td> <td align="left" width="220"><input type="text" size="30" name="ort_rechnung"></td> </tr> <tr> <td align="left" width="200">Votre téléphone:</td> <td align="left" width="220"><input type="text" size="30" name="telefon_rechnung"></td> </tr> <tr> <td align="left" width="200">Votre E-Mail:</td> <td align="left" width="220"><input type="text" size="30" name="email_rechnung"></td> </tr> <tr> <td align="left" width="200">Message:</td> <td colspan="4" width="300"><textarea name="message" size="300" rows="6" cols="59">Message</textarea></td> </tr> </table> <hr align="left" color="#990000" size="2" width="550"> <table width="550" border="0" bgcolor="#CCCCCC"> <tr> <td colspan="2" height="30"><b>Adresse de livraison (si différente)</b></td> </tr> <tr> <td align="left" width="200">Votre rue:</td> <td align="left" width="220"><input type="text" size="30" name="strasse_lieferung"></td> </tr> <tr> <td align="left" width="200">Votre code postal:</td> <td align="left" width="220"><input type="text" size="30" name="plz_lieferung" placeholder="12345"></td> </tr> <tr> <td align="left" width="200">Votre lieu:</td> <td align="left" width="220"><input type="text" size="30" name="ort_lieferung"></td> </tr> </table> <hr align="left" color="#990000" size="2" width="550"> <br> <table> <tr> <td><p>Produits fair-trade triés par fournisseur et catégorie</p></td> </tr> </table> <table border="0"> <tr> <td width="120"><p>Code article</p></td> <td width="320"><p>Désignation</p></td> <td width="150"><p>Label</p></td> <td width="150"><p>Pièces par colis</p></td> <td width="150"><p>Carton</p></td> <td width="150"><p>Paquet</p></td> </tr> </table> <?php while($row = mysql_fetch_array($result)) { $stueck = ''; $feld1 = $row['feld1']; $feld2 = $row['feld2']; $ergebnis = $row['ergebnis']; $category_name = $row['category_name']; $category_id = $row['category_id']; $product_id = $row['product_id']; $product_sku = $row['product_sku']; $product_special = $row['product_special']; $product_s_desc = $row['product_s_desc']; if ($product_special == 'N') { $product_special = '-'; } else { $product_special = 'Bio'; } $product_s_desc = $row['product_s_desc']; if ($product_s_desc == '0') { $product_s_desc = '-'; } else { $product_s_desc = $product_s_desc; } $mf_name = $row['mf_name']; $product_name = $row['product_name']; $product_packaging = $row['product_packaging']; $product_packaging .= " paquets"; $product_price = number_format($row['product_price'], 2, ',', ' '); $product_price .= ' €'; $shopper_group_id = $row['shopper_group_id']; if ($product_s_desc != '') { if ( $category_id == $category_id_old OR $category_name == $category_name_old ) { echo "<table border='0'>"; echo "<tr>"; echo "<td width='120'>" . $row[product_sku] . "</td>"; echo "<td width='320'>" . $row[product_name] . "</td>"; echo "<td width='150'>" . $row[product_s_desc] . "</td>"; echo "<td width='150'>" . $row[product_packaging] . " Pièces par colis</td><input type='hidden' id='$row[feld1]' value='$row[product_packaging]' onChange='berechnen()'>"; echo "<td width='150'><input id='$row[feld2]' type='number' maxlength='3' size='1' name='$row[product_sku] $row[product_name] \t' value='0' onChange='berechnen()'></td>"; echo "<td width='150'><div id='row$[ergebnis]'></div></td>"; echo "</table>"; } else { if ( $mf_name != $mf_name_old) { echo "<table border='0'>"; echo "<tr>"; echo "<td width='910'><p>" . $row[mf_name] . "</p></td>"; echo "</tr>"; echo "</table>"; } else { $y_axis = $y_axis; } echo "<table border='0'>"; echo "<tr>"; echo "<td width='910' bgcolor='#CCCCCC'>" . $row[category_name] . "</td>"; echo "</tr>"; echo "</table>"; echo "<table border='0'>"; echo "<tr>"; echo "<td width='120'>" . $row[product_sku] . "</td>"; echo "<td width='320'>" . $row[product_name] . "</td>"; echo "<td width='150'>" . $row[product_s_desc] . "</td>"; echo "<td width='150'>" . $row[product_packaging] . " Pièces par colis</td><input type='hidden' id='$row[feld1]' value='$row[product_packaging]' onChange='berechnen()'>"; echo "<td width='150'><input id='$row[feld2]' type='number' maxlength='3' size='1' name='$row[product_sku] $row[product_name] \t' value='0' onChange='berechnen()'></td>"; echo "<td width='150'><div id='$row[ergebnis]'></div></td>"; } } $y_axis = $y_axis + 3; $i = $i + 1; $category_id_old = $category_id; $category_name_old = $category_name; $mf_name_old = $mf_name; $feld1 = $feld1 + 1; $feld2 = $feld2 + 1; $ergebnis = $ergebnis + 1; } echo mysql_error(); mysql_close($link); ?> <br><br> <input type="submit" value="Absenden / Envoyer" /> <input type="reset" value="Reset / Effacer" /> </form> <br><br><br> </body> </html>

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.0110.00718.55
8.3.50.0160.00321.92
8.3.40.0040.01118.97
8.3.30.0120.00419.01
8.3.20.0060.00320.47
8.3.10.0040.00421.90
8.3.00.0080.00019.50
8.2.180.0070.01418.66
8.2.170.0110.00422.96
8.2.160.0070.00720.49
8.2.150.0030.00524.18
8.2.140.0070.00324.66
8.2.130.0050.00320.64
8.2.120.0000.00826.35
8.2.110.0100.00020.47
8.2.100.0090.00318.29
8.2.90.0030.00519.30
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0000.00818.16
8.2.50.0030.00518.07
8.2.40.0000.00819.59
8.2.30.0070.00020.68
8.2.20.0030.00617.85
8.2.10.0030.00518.19
8.2.00.0060.00318.29
8.1.280.0130.01025.92
8.1.270.0040.00423.91
8.1.260.0050.00328.09
8.1.250.0050.00328.09
8.1.240.0090.00022.17
8.1.230.0120.00018.04
8.1.220.0050.00317.89
8.1.210.0030.00618.77
8.1.200.0030.00617.60
8.1.190.0000.00817.64
8.1.180.0050.00318.10
8.1.170.0000.00818.65
8.1.160.0070.00022.13
8.1.150.0080.00018.97
8.1.140.0040.00819.74
8.1.130.0040.00417.86
8.1.120.0050.00317.64
8.1.110.0000.00817.59
8.1.100.0040.00417.58
8.1.90.0000.01017.68
8.1.80.0060.00317.52
8.1.70.0030.00317.43
8.1.60.0030.00517.75
8.1.50.0000.00817.71
8.1.40.0030.00517.74
8.1.30.0050.00317.91
8.1.20.0000.01017.80
8.1.10.0040.00417.72
8.1.00.0030.00517.71
8.0.300.0020.00518.77
8.0.290.0040.00417.00
8.0.280.0000.00718.54
8.0.270.0040.00417.16
8.0.260.0070.00017.50
8.0.250.0030.00317.25
8.0.240.0060.00317.24
8.0.230.0040.00417.13
8.0.220.0030.00317.18
8.0.210.0060.00317.14
8.0.200.0030.00317.13
8.0.190.0080.00017.14
8.0.180.0000.00917.20
8.0.170.0040.00417.19
8.0.160.0050.00317.16
8.0.150.0060.00317.19
8.0.140.0000.00817.12
8.0.130.0030.00513.61
8.0.120.0000.00817.04
8.0.110.0040.00417.09
8.0.100.0080.00017.05
8.0.90.0070.00017.24
8.0.80.0060.01017.11
8.0.70.0080.00017.22
8.0.60.0020.00517.09
8.0.50.0030.00516.99
8.0.30.0050.01717.13
8.0.20.0090.01317.46
8.0.10.0040.00417.04
8.0.00.0080.01516.98
7.4.330.0050.00016.76
7.4.320.0030.00516.79
7.4.300.0000.00716.80
7.4.290.0080.00016.75
7.4.280.0060.00316.68
7.4.270.0040.00416.73
7.4.260.0070.00016.73
7.4.250.0040.00416.59
7.4.240.0030.00516.71
7.4.230.0040.00416.74
7.4.220.0100.01616.84
7.4.210.0100.01016.65
7.4.200.0000.00716.87
7.4.160.0160.00016.80
7.4.150.0140.01017.40
7.4.140.0110.00817.86
7.4.130.0070.01116.68
7.4.120.0050.01916.70
7.4.110.0070.01016.76
7.4.100.0150.00916.91
7.4.90.0000.01816.72
7.4.80.0070.01119.39
7.4.70.0090.00916.71
7.4.60.0070.01016.77
7.4.50.0090.00916.78
7.4.40.0090.00916.66
7.4.30.0070.01616.60
7.4.00.0050.00915.13
7.3.330.0030.00613.43
7.3.320.0030.00313.46
7.3.310.0040.00416.40
7.3.300.0030.00316.42
7.3.290.0050.00916.57
7.3.280.0140.00716.63
7.3.270.0120.00617.40
7.3.260.0060.01916.55
7.3.250.0060.01316.49
7.3.240.0090.00816.50
7.3.230.0100.00716.82
7.3.210.0090.01316.64
7.3.200.0100.00716.42
7.3.190.0080.01216.55
7.3.180.0100.00616.57
7.3.170.0160.00616.80
7.3.160.0120.00916.52
7.3.120.0100.01015.13
7.3.110.0040.01515.16
7.3.100.0040.01115.05
7.3.90.0090.00314.96
7.3.80.0040.01514.94
7.3.70.0060.00615.11
7.3.60.0030.01315.10
7.3.50.0040.00715.05
7.3.40.0040.00414.72
7.3.30.0040.01114.94
7.3.20.0030.01016.64
7.3.10.0070.00316.71
7.3.00.0040.00716.79
7.2.330.0250.02516.57
7.2.320.0070.01116.76
7.2.310.0100.00716.75
7.2.300.0030.01616.91
7.2.290.0070.01117.04
7.2.250.0130.00714.83
7.2.240.0110.01115.08
7.2.230.0120.00615.24
7.2.220.0030.00615.08
7.2.210.0060.00615.18
7.2.200.0000.01615.26
7.2.190.0060.00615.14
7.2.180.0000.00915.11
7.2.170.0040.00415.16
7.2.60.0040.01117.11
7.2.00.0030.00919.70
7.1.330.0030.01515.74
7.1.320.0030.00716.08
7.1.310.0030.00915.52
7.1.300.0080.00315.73
7.1.290.0080.00015.90
7.1.280.0050.00515.66
7.1.270.0000.01115.42
7.1.260.0000.01015.92
7.1.200.0070.01415.68
7.1.100.0070.00718.00
7.1.70.0000.00716.93
7.1.60.0060.01919.36
7.1.50.0030.01317.00
7.1.00.0030.07722.49
7.0.200.0070.00416.73
7.0.100.0170.07320.11
7.0.90.0030.08720.11
7.0.80.0100.07320.10
7.0.70.0070.08320.01
7.0.60.0030.08320.22
7.0.50.0170.07720.46
7.0.40.0000.08320.04
7.0.30.0170.07320.11
7.0.20.0100.08320.18
7.0.10.0130.07020.04
7.0.00.0100.08319.94
5.6.280.0000.05721.10
5.6.250.0030.08020.78
5.6.240.0000.09020.64
5.6.230.0100.08320.60
5.6.220.0000.07020.80
5.6.210.0070.07320.75
5.6.200.0070.06321.14
5.6.190.0070.08321.13
5.6.180.0170.03721.06
5.6.170.0030.06021.22
5.6.160.0100.08021.00
5.6.150.0000.07321.16
5.6.140.0230.06021.04
5.6.130.0100.08321.11
5.6.120.0030.05021.07
5.6.110.0200.06021.05
5.6.100.0100.08321.05
5.6.90.0100.08321.05
5.6.80.0000.08320.54
5.6.70.0130.04020.50
5.6.60.0130.07020.55
5.6.50.0030.07320.48
5.6.40.0070.05020.49
5.6.30.0070.05320.49
5.6.20.0070.05020.41
5.6.10.0130.07720.57
5.6.00.0170.07020.34
5.5.380.0100.05320.46
5.5.370.0200.04720.41
5.5.360.0030.08320.50
5.5.350.0000.08720.40
5.5.340.0100.07720.86
5.5.330.0100.06720.98
5.5.320.0170.07020.70
5.5.310.0100.08320.95
5.5.300.0130.07720.82
5.5.290.0170.07320.94
5.5.280.0100.04020.81
5.5.270.0100.08020.77
5.5.260.0030.09020.65
5.5.250.0100.08020.60
5.5.240.0070.08320.23
5.5.230.0130.07320.08
5.5.220.0230.05720.26
5.5.210.0130.07320.33
5.5.200.0030.08320.29
5.5.190.0100.07320.14
5.5.180.0100.07320.28
5.5.160.0070.07720.26
5.5.150.0130.04020.04
5.5.140.0100.07720.28
5.5.130.0030.08020.26
5.5.120.0100.07020.31
5.5.110.0130.07020.27
5.5.100.0100.07320.14
5.5.90.0170.06320.12
5.5.80.0130.05720.14
5.5.70.0030.07720.11
5.5.60.0070.07720.05
5.5.50.0000.07720.13
5.5.40.0070.04720.10
5.5.30.0170.06320.09
5.5.20.0030.07020.15
5.5.10.0070.06320.19
5.5.00.0130.07720.07

preferences:
59.16 ms | 401 KiB | 5 Q