3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime; $start = new DateTime('saturday this week 15:00'); $end = new DateTime('monday next week 08:00'); $departure = new DateTime($flSummary[0]['ddt']); echo $now; echo $start; echo $end; if ($now > $start && $now < $end && $departure->diff($now)->hours <= 72) { echo 'Error! Please contact administrator!'; } $now = new DateTimeImmutable; $departure = $now->modify('+42 hours'); echo $now->format('Y-m-d H:i:s') . PHP_EOL; echo $departure->format('Y-m-d H:i:s') . PHP_EOL; echo $now->diff($departure)->format('%h') . PHP_EOL;
Output for git.master, git.master_jit
Warning: Undefined variable $flSummary in /in/ppgdM on line 5 Warning: Trying to access array offset on value of type null in /in/ppgdM on line 5 Warning: Trying to access array offset on value of type null in /in/ppgdM on line 5 Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/ppgdM on line 5 Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/ppgdM:6 Stack trace: #0 {main} thrown in /in/ppgdM on line 6
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $flSummary in /in/ppgdM on line 5 Warning: Trying to access array offset on null in /in/ppgdM on line 5 Warning: Trying to access array offset on null in /in/ppgdM on line 5 Deprecated: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/ppgdM on line 5 Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/ppgdM:6 Stack trace: #0 {main} thrown in /in/ppgdM on line 6
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:
49.76 ms | 401 KiB | 8 Q