3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Australia/Perth'); $d=new DateTime(); $d = var_export($d, true); var_dump(json_encode($d));

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
string(142) ""DateTime::__set_state(array(\n 'date' => '2014-06-20 10:35:21.000000',\n 'timezone_type' => 3,\n 'timezone' => 'Australia\/Perth',\n))""
Output for Array change keys
string(142) ""DateTime::__set_state(array(\n 'date' => '2014-06-20 10:35:21.000000',\n 'timezone_type' => 3,\n 'timezone' => 'Australia\/Perth',\n))""
Output for Lexical anon
string(142) ""DateTime::__set_state(array(\n 'date' => '2014-06-20 10:35:21.000000',\n 'timezone_type' => 3,\n 'timezone' => 'Australia\/Perth',\n))""

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