3v4l.org

run code in 500+ PHP versions simultaneously
<?php $time = '1985-04-19T19:12:11'; $timeOnly = DateTime::createFromFormat("Y-m-d\TH:i:s+", $time)->setDate(1970, 1, 1); $begin = (new DateTime('18:00'))->setDate(1970, 1, 1); $end = (new DateTime('22:00'))->setDate(1970, 1, 1); var_dump($timeOnly, $begin, $end, $timeOnly > $begin, $timeOnly < $end);
Output for rfc.property-hooks, git.master, git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "1970-01-01 19:12:11.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "1970-01-01 18:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#3 (3) { ["date"]=> string(26) "1970-01-01 22:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } bool(true) bool(true)

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:
31.84 ms | 918 KiB | 4 Q