3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); $a = ' '; $b = new \DateTime(); $c = '0 day'; $d = new \DateTime(); var_dump($b->modify($a)); var_dump($d->modify($c));
Output for 8.4.26
object(DateTime)#1 (3) { ["date"]=> string(26) "2026-10-21 22:33:46.011415" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2026-10-21 22:33:46.011420" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }

preferences:
27.62 ms | 1152 KiB | 6 Q