3v4l.org

run code in 300+ PHP versions simultaneously
<?php $gatos = array( array( "id" => 1, "name" => "Titus", "fecha" => new \DateTime(), ), array( "id" => 2, "name" => "Gato", "fecha" => new \DateTime(), ), ); usort($gatos, function($gato1,$gato2){ return strcmp($gato1["fecha"]->format("md"),$gato2["fecha"]->format("md")); }); var_dump($gatos);
Output for git.master
array(2) { [0]=> array(3) { ["id"]=> int(1) ["name"]=> string(5) "Titus" ["fecha"]=> object(DateTime)#1 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.003733" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [1]=> array(3) { ["id"]=> int(2) ["name"]=> string(4) "Gato" ["fecha"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.003740" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } }
Output for git.master_jit
array(2) { [0]=> array(3) { ["id"]=> int(1) ["name"]=> string(5) "Titus" ["fecha"]=> object(DateTime)#1 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.003907" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [1]=> array(3) { ["id"]=> int(2) ["name"]=> string(4) "Gato" ["fecha"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.003914" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } }
Output for rfc.property-hooks
array(2) { [0]=> array(3) { ["id"]=> int(1) ["name"]=> string(5) "Titus" ["fecha"]=> object(DateTime)#1 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.005321" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } } [1]=> array(3) { ["id"]=> int(2) ["name"]=> string(4) "Gato" ["fecha"]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-05-30 21:34:53.005326" ["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:
36.62 ms | 402 KiB | 8 Q