3v4l.org

run code in 300+ PHP versions simultaneously
<?php class JobTimer{ public function __construct() { } public function isDateTime($startOn, $timezone = "GMT"){ $nowTime = new \DateTime("NOW", new \DateTimeZone($timezone)); $startTime = \DateTime::createFromFormat('Y-m-d H:iA', $startOn, new \DateTimeZone($timezone)); return $nowTime >= $startTime; } } $job = new JobTimer(); //if($job->isDateTime("2019-05-02 12:00AM", "Asia/Kuala_Lumpur")){ //if($job->isDateTime("2021-05-02 12:00AM", "Asia/Kuala_Lumpur")){ if($job->isDateTime("2020-05-02 12:00AM", "Asia/Kuala_Lumpur")){ echo "YES"; }else{ echo "NO"; }
Output for git.master, git.master_jit, rfc.property-hooks
NO

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:
127.66 ms | 405 KiB | 5 Q