3v4l.org

run code in 300+ PHP versions simultaneously
<?php $years = [ -25000, 0, 9999, 10000, 25000, ]; foreach ($years as $year) { $dt1 = date_create_from_format('d/m/Y', "22/09/$year"); $dt2 = new \DateTime(); $dt2->setDate($year, 9, 22); var_dump($year, $dt1, $dt2); echo "\n"; }
Output for git.master_jit
int(-25000) bool(false) object(DateTime)#1 (3) { ["date"]=> string(28) "-25000-09-22 16:18:21.006353" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(0) object(DateTime)#2 (3) { ["date"]=> string(26) "0000-09-22 16:18:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#3 (3) { ["date"]=> string(26) "0000-09-22 16:18:21.006415" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(9999) object(DateTime)#1 (3) { ["date"]=> string(26) "9999-09-22 16:18:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "9999-09-22 16:18:21.006480" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(10000) bool(false) object(DateTime)#1 (3) { ["date"]=> string(28) "+10000-09-22 16:18:21.006543" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(25000) bool(false) object(DateTime)#2 (3) { ["date"]=> string(28) "+25000-09-22 16:18:21.006579" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for git.master
/bin/php-git-master: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-git-master) /bin/php-git-master: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-git-master)
Process exited with code 1.
Output for rfc.property-hooks
int(-25000) bool(false) object(DateTime)#1 (3) { ["date"]=> string(28) "-25000-09-22 16:18:21.003482" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(0) object(DateTime)#2 (3) { ["date"]=> string(26) "0000-09-22 16:18:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#3 (3) { ["date"]=> string(26) "0000-09-22 16:18:21.003526" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(9999) object(DateTime)#1 (3) { ["date"]=> string(26) "9999-09-22 16:18:21.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "9999-09-22 16:18:21.003569" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(10000) bool(false) object(DateTime)#1 (3) { ["date"]=> string(28) "+10000-09-22 16:18:21.003612" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } int(25000) bool(false) object(DateTime)#2 (3) { ["date"]=> string(28) "+25000-09-22 16:18:21.003635" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }

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:
30.7 ms | 412 KiB | 5 Q