3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ex_procedural($time) { date_default_timezone_set( 'America/New_york' ); $now = strtotime($time); if ( date('H', $now) < 13 ) { // if before 1PM $del_time = strtotime( '7 weekdays' ); } else { // if 1PM or later $del_time = strtotime( '8 weekdays' ); } $del_day = date( 'l jS F', $del_time); $today = mktime(13, 0, 0, date('n', $now), date('j', $now), date('Y', $now)); $tomorrow = mktime(13, 0, 0, date('n', $now), date('j', $now) + 1, date('Y', $now)); $timeLeft = ($now >= $today ? $tomorrow : $today) - $now; $days = intval($timeLeft / 86400); $hour = (intval($timeLeft / 3600) % 24) + ($days * 24); $min = intval($timeLeft / 60) % 60; printf('Order Arrives: %s - Order within %s hrs and %s mins%s', $del_day, $hour, $min, PHP_EOL); } ex_procedural('2023-08-11 12:01:00'); ex_procedural('2023-08-11 13:01:00');
Output for git.master
/bin/php-git-master: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-git-master) /bin/php-git-master: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-git-master)
Process exited with code 1.
Output for git.master_jit, rfc.property-hooks
Order Arrives: Tuesday 22nd August - Order within 0 hrs and 59 mins Order Arrives: Wednesday 23rd August - Order within 23 hrs and 59 mins

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:
57.43 ms | 407 KiB | 5 Q