3v4l.org

run code in 300+ PHP versions simultaneously
<?php function inRange($x, $a, $b) { return ($x >= $a && $x <= $b) ? "YES" : "NO"; } // No args $now = time(); touch("/tmp/test0"); $fileInfo = new SplFileInfo("/tmp/test0"); print(inRange($fileInfo->getMTime(), $now, $now + 10)."\n"); print(inRange($fileInfo->getATime(), $now, $now + 10)."\n"); // Mofification time only touch("/tmp/test1", strtotime("2005-10-15")); $fileInfo = new SplFileInfo("/tmp/test1"); print($fileInfo->getMTime()."\n"); print($fileInfo->getATime()."\n"); // Modification and access time touch("/tmp/test2", strtotime("2005-10-15"), strtotime("2010-10-15")); $fileInfo = new SplFileInfo("/tmp/test2"); print($fileInfo->getMTime()."\n"); print($fileInfo->getATime()."\n");
Output for git.master_jit, git.master
YES YES 1411234031 1411234031 1411234031 1411234031

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:
40.15 ms | 401 KiB | 7 Q