3v4l.org

run code in 300+ PHP versions simultaneously
<?php require("http://www.receivers.org/ads/db.php"); mysql_connect($DBserver, $DBuser, $DBpass); mysql_select_db($DBname) or die(mysql_error()); $result = mysql_query("SELECT * FROM CRFAds where AdNumber='4'") or die(mysql_error()); $row = mysql_fetch_array( $result ); If ($row['NewOrRenewal'] == "New") { $ExpireDate=date("F j, Y", strtotime("$StartDate +92 days")); }else{ $ExpireDate=date("F j, Y", strtotime("$StartDate +122 days")); } $today = date("F j, Y"); $StartDate=date("F j, Y", strtotime("$StartDate")); $TimeLeft = abs(strtotime($ExpireDate) - strtotime($today)); $daysleft = floor(($TimeLeft - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); $TimePosted = abs(strtotime($today) - strtotime($StartDate)); $daysPosted = floor(($TimePosted - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)); echo "Start Date: $StartDate";?><br><? echo "Days Posted: $daysPosted";?><br><? echo "Days Left: $daysleft";?><br><? echo "Today's Date: $today";?><br><? echo "Expiration Date: $ExpireDate";?><br><? echo "Ad Number: ".$row['AdNumber'];?><br><? echo "Submitted by: ".$row['SubmitterName']; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /in/QNXr7 on line 2 Warning: require(http://www.receivers.org/ads/db.php): Failed to open stream: no suitable wrapper could be found in /in/QNXr7 on line 2 Fatal error: Uncaught Error: Failed opening required 'http://www.receivers.org/ads/db.php' (include_path='.:') in /in/QNXr7:2 Stack trace: #0 {main} thrown in /in/QNXr7 on line 2
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.37 ms | 402 KiB | 8 Q