3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $accountNumber = "28947754"; $confirmationNumber = "1352524556"; $sess = array(/*"EL_xml_Error"=>"Invalid credit card number or credit card type. Please try again. If the difficulty continues, please go to http://support.earthlink.net and contact us by email or live chat. You may also call 1-800-719-4660 for assistance."*/); if(($accountNumber !== "" && $accountNumber !== "N/A") && ($confirmationNumber !== "" && $confirmationNumber !== "N/A")) { $displayString = "<h1 style=\"text-decoration: underline;\">Order Successfully Placed</h1>"; $displayString .= "<div id=\"orderConfirmed\" name=\"orderConfirmed\">"; $displayString .= "<p>Your order has been placed successfully. Please find your account number and confirmation number below.<br />Keep these numbers for your reference should you need further assistance with your order."; $displayString .= "<ul class=\"confirmationInfo\">"; $displayString .= "<li>Account Number: <strong>{$accountNumber}</strong></li>"; $displayString .= "<li>Confirmation Number: <strong>{$confirmationNumber}</strong></li>"; $displayString .= "</ul>"; $displayString .= "<p>If you need further information concerning this order, please call 1-888-327-8454.</p>"; $displayString .= "</div>"; echo $displayString; } else if(array_key_exists("EL_xml_Error",$sess) && isset($sess["EL_xml_Error"])) { if(($accountNumber !== "" && $accountNumber !== "N/A") && ($confirmationNumber !== "" && $confirmationNumber !== "N/A")) { $displayString = "<h1 style=\"text-decoration: underline;\">Order Successfully Placed</h1>"; $displayString .= "<div id=\"orderConfirmed\" name=\"orderConfirmed\">"; $displayString .= "<p>Your order has been placed successfully. Please find your account number and confirmation number below.<br />Keep these numbers for your reference should you need further assistance with your order."; $displayString .= "<ul class=\"confirmationInfo\">"; $displayString .= "<li>Account Number: <strong>{$accountNumber}</strong></li>"; $displayString .= "<li>Confirmation Number: <strong>{$confirmationNumber}</strong></li>"; $displayString .= "</ul>"; $displayString .= "<p>If you need further information concerning this order, please call 1-888-327-8454.</p>"; $displayString .= "</div>"; echo $displayString; } else { $displayString = "<h1 style=\"text-decoration: underline;\">Order Failed</h1>"; $displayString .= "<div style=\"color: red;\" id=\"orderConfirmed\" name=\"orderConfirmed\">"; $displayString .= "<strong>EarthLink returned the following error: {$sess["EL_xml_Error"]}</strong>"; $displayString .= "</div>"; echo $displayString; } } else if($accountNumber == "N/A" || $confirmationNumber == "N/A") { $displayString = "<h1 style=\"text-decoration: underline;\">Order Failed</h1>"; $displayString .= "<div id=\"orderConfirmed\" name=\"orderConfirmed\">"; $displayString .= "An unidentified problem has occurred while placing this order."; $displayString .= "</div>"; echo $displayString; }
Output for 4.3.0 - 7.1.0
<h1 style="text-decoration: underline;">Order Successfully Placed</h1><div id="orderConfirmed" name="orderConfirmed"><p>Your order has been placed successfully. Please find your account number and confirmation number below.<br />Keep these numbers for your reference should you need further assistance with your order.<ul class="confirmationInfo"><li>Account Number: <strong>28947754</strong></li><li>Confirmation Number: <strong>1352524556</strong></li></ul><p>If you need further information concerning this order, please call 1-888-327-8454.</p></div>