3v4l.org

run code in 500+ PHP versions simultaneously
<?php $time = '1985-04-19T19:12:11'; $timeOnly = DateTime::createFromFormat("!????-??-??\TH:i:s+", $time); $begin = DateTime::createFromFormat('!H:i', '18:00'); $end = DateTime::createFromFormat('!H:i', '22:00'); var_dump($timeOnly, $begin, $end, $timeOnly > $begin, $timeOnly < $end);
Output for git.master, git.master_jit, rfc.property-hooks
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:
76.91 ms | 913 KiB | 4 Q