3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(range('a', 'z') as $letter){ try{ $date = new \DateTime($letter); var_dump($date); } catch(Exception $e){ var_dump($e->getMessage()); } } foreach(range('a', 'z') as $letter){ try{ $date = new \DateTime($letter . $letter); var_dump($date); } catch(Exception $e){ var_dump($e->getMessage()); } }
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003576" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "A" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003629" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "B" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003660" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "C" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003686" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "D" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003709" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "E" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003731" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "F" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003752" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "G" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003773" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "H" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003794" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "I" } string(98) "Failed to parse time string (j) at position 0 (j): The timezone could not be found in the database" object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003838" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "K" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003860" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "L" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003882" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "M" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003904" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "N" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003925" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "O" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003946" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "P" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003967" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Q" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003988" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "R" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004009" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "S" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004030" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "T" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004051" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "U" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004073" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "V" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004094" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "W" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004116" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "X" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004139" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Y" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004165" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" } string(99) "Failed to parse time string (aa) at position 0 (a): The timezone could not be found in the database" string(99) "Failed to parse time string (bb) at position 0 (b): The timezone could not be found in the database" string(99) "Failed to parse time string (cc) at position 0 (c): The timezone could not be found in the database" string(99) "Failed to parse time string (dd) at position 0 (d): The timezone could not be found in the database" string(99) "Failed to parse time string (ee) at position 0 (e): The timezone could not be found in the database" string(99) "Failed to parse time string (ff) at position 0 (f): The timezone could not be found in the database" string(99) "Failed to parse time string (gg) at position 0 (g): The timezone could not be found in the database" string(99) "Failed to parse time string (hh) at position 0 (h): The timezone could not be found in the database" string(99) "Failed to parse time string (ii) at position 0 (i): The timezone could not be found in the database" string(99) "Failed to parse time string (jj) at position 0 (j): The timezone could not be found in the database" string(99) "Failed to parse time string (kk) at position 0 (k): The timezone could not be found in the database" string(99) "Failed to parse time string (ll) at position 0 (l): The timezone could not be found in the database" string(99) "Failed to parse time string (mm) at position 0 (m): The timezone could not be found in the database" string(99) "Failed to parse time string (nn) at position 0 (n): The timezone could not be found in the database" string(99) "Failed to parse time string (oo) at position 0 (o): The timezone could not be found in the database" string(99) "Failed to parse time string (pp) at position 0 (p): The timezone could not be found in the database" string(99) "Failed to parse time string (qq) at position 0 (q): The timezone could not be found in the database" string(99) "Failed to parse time string (rr) at position 0 (r): The timezone could not be found in the database" string(99) "Failed to parse time string (ss) at position 0 (s): The timezone could not be found in the database" string(99) "Failed to parse time string (tt) at position 0 (t): The timezone could not be found in the database" string(99) "Failed to parse time string (uu) at position 0 (u): The timezone could not be found in the database" string(99) "Failed to parse time string (vv) at position 0 (v): The timezone could not be found in the database" string(99) "Failed to parse time string (ww) at position 0 (w): The timezone could not be found in the database" string(99) "Failed to parse time string (xx) at position 0 (x): The timezone could not be found in the database" string(99) "Failed to parse time string (yy) at position 0 (y): The timezone could not be found in the database" string(99) "Failed to parse time string (zz) at position 0 (z): The timezone could not be found in the database"
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003813" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "A" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003863" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "B" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003889" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "C" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003911" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "D" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003933" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "E" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003955" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "F" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003976" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "G" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003998" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "H" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004019" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "I" } string(98) "Failed to parse time string (j) at position 0 (j): The timezone could not be found in the database" object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004064" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "K" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004085" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "L" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004108" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "M" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004130" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "N" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004151" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "O" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004173" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "P" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004196" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Q" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004225" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "R" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004248" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "S" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004270" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "T" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004292" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "U" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004313" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "V" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004334" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "W" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004356" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "X" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004378" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Y" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004400" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" } string(99) "Failed to parse time string (aa) at position 0 (a): The timezone could not be found in the database" string(99) "Failed to parse time string (bb) at position 0 (b): The timezone could not be found in the database" string(99) "Failed to parse time string (cc) at position 0 (c): The timezone could not be found in the database" string(99) "Failed to parse time string (dd) at position 0 (d): The timezone could not be found in the database" string(99) "Failed to parse time string (ee) at position 0 (e): The timezone could not be found in the database" string(99) "Failed to parse time string (ff) at position 0 (f): The timezone could not be found in the database" string(99) "Failed to parse time string (gg) at position 0 (g): The timezone could not be found in the database" string(99) "Failed to parse time string (hh) at position 0 (h): The timezone could not be found in the database" string(99) "Failed to parse time string (ii) at position 0 (i): The timezone could not be found in the database" string(99) "Failed to parse time string (jj) at position 0 (j): The timezone could not be found in the database" string(99) "Failed to parse time string (kk) at position 0 (k): The timezone could not be found in the database" string(99) "Failed to parse time string (ll) at position 0 (l): The timezone could not be found in the database" string(99) "Failed to parse time string (mm) at position 0 (m): The timezone could not be found in the database" string(99) "Failed to parse time string (nn) at position 0 (n): The timezone could not be found in the database" string(99) "Failed to parse time string (oo) at position 0 (o): The timezone could not be found in the database" string(99) "Failed to parse time string (pp) at position 0 (p): The timezone could not be found in the database" string(99) "Failed to parse time string (qq) at position 0 (q): The timezone could not be found in the database" string(99) "Failed to parse time string (rr) at position 0 (r): The timezone could not be found in the database" string(99) "Failed to parse time string (ss) at position 0 (s): The timezone could not be found in the database" string(99) "Failed to parse time string (tt) at position 0 (t): The timezone could not be found in the database" string(99) "Failed to parse time string (uu) at position 0 (u): The timezone could not be found in the database" string(99) "Failed to parse time string (vv) at position 0 (v): The timezone could not be found in the database" string(99) "Failed to parse time string (ww) at position 0 (w): The timezone could not be found in the database" string(99) "Failed to parse time string (xx) at position 0 (x): The timezone could not be found in the database" string(99) "Failed to parse time string (yy) at position 0 (y): The timezone could not be found in the database" string(99) "Failed to parse time string (zz) at position 0 (z): The timezone could not be found in the database"
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003672" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "A" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003733" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "B" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003775" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "C" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003812" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "D" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003847" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "E" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003884" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "F" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003919" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "G" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003955" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "H" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.003990" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "I" } string(98) "Failed to parse time string (j) at position 0 (j): The timezone could not be found in the database" object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004060" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "K" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004096" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "L" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004132" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "M" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004167" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "N" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004202" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "O" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004238" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "P" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004274" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Q" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004309" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "R" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004344" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "S" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004380" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "T" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004415" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "U" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004451" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "V" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004487" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "W" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004522" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "X" } object(DateTime)#2 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004558" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Y" } object(DateTime)#1 (3) { ["date"]=> string(26) "2013-09-29 16:57:19.004593" ["timezone_type"]=> int(2) ["timezone"]=> string(1) "Z" } string(99) "Failed to parse time string (aa) at position 0 (a): The timezone could not be found in the database" string(99) "Failed to parse time string (bb) at position 0 (b): The timezone could not be found in the database" string(99) "Failed to parse time string (cc) at position 0 (c): The timezone could not be found in the database" string(99) "Failed to parse time string (dd) at position 0 (d): The timezone could not be found in the database" string(99) "Failed to parse time string (ee) at position 0 (e): The timezone could not be found in the database" string(99) "Failed to parse time string (ff) at position 0 (f): The timezone could not be found in the database" string(99) "Failed to parse time string (gg) at position 0 (g): The timezone could not be found in the database" string(99) "Failed to parse time string (hh) at position 0 (h): The timezone could not be found in the database" string(99) "Failed to parse time string (ii) at position 0 (i): The timezone could not be found in the database" string(99) "Failed to parse time string (jj) at position 0 (j): The timezone could not be found in the database" string(99) "Failed to parse time string (kk) at position 0 (k): The timezone could not be found in the database" string(99) "Failed to parse time string (ll) at position 0 (l): The timezone could not be found in the database" string(99) "Failed to parse time string (mm) at position 0 (m): The timezone could not be found in the database" string(99) "Failed to parse time string (nn) at position 0 (n): The timezone could not be found in the database" string(99) "Failed to parse time string (oo) at position 0 (o): The timezone could not be found in the database" string(99) "Failed to parse time string (pp) at position 0 (p): The timezone could not be found in the database" string(99) "Failed to parse time string (qq) at position 0 (q): The timezone could not be found in the database" string(99) "Failed to parse time string (rr) at position 0 (r): The timezone could not be found in the database" string(99) "Failed to parse time string (ss) at position 0 (s): The timezone could not be found in the database" string(99) "Failed to parse time string (tt) at position 0 (t): The timezone could not be found in the database" string(99) "Failed to parse time string (uu) at position 0 (u): The timezone could not be found in the database" string(99) "Failed to parse time string (vv) at position 0 (v): The timezone could not be found in the database" string(99) "Failed to parse time string (ww) at position 0 (w): The timezone could not be found in the database" string(99) "Failed to parse time string (xx) at position 0 (x): The timezone could not be found in the database" string(99) "Failed to parse time string (yy) at position 0 (y): The timezone could not be found in the database" string(99) "Failed to parse time string (zz) at position 0 (z): The timezone could not be found in the database"

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.25 ms | 417 KiB | 8 Q