3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('DAY', 24*60*60, true); $startDate = date('F d, Y'); $AdExpirationDate = date("F d, Y",strtotime($startDate . '+120 days')); //Calculate the difference between expiration date and today to see if it expires within 30 days $today = date("F d, Y"); $DayDiff = abs(strtotime($AdExpirationDate) - strtotime($today)); $DaysToExpiration = floor($DayDiff / DAY); if ($DaysToExpiration <= 30) { $Expire30 = true; }else{ $Expire30 = false; } if($Expire30) { echo "true"; } else { echo "false"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: define(): Argument #3 ($case_insensitive) is ignored since declaration of case-insensitive constants is no longer supported in /in/BbbMS on line 3 false

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:
32.88 ms | 401 KiB | 8 Q