3v4l.org

run code in 300+ PHP versions simultaneously
<?php $gatos = array( array( "id" => 1, "name" => "Titus", "fecha" => "2013-05-14 00:00:00", ), array( "id" => 2, "name" => "Gato", "fecha" => "2010-08-11 00:00:00", ), array( "id" => 3, "name" => "Malinche", "fecha" => "2011-02-28 00:00:00", ), array( "id" => 4, "name" => "Pepito", "fecha" => "2008-05-30 00:00:00", ), ); usort($gatos, function($gato1,$gato2){ return strcmp($gato1["fecha"]->format("md"),$gato2["fecha"]->format("md")); }); var_dump($gatos);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to a member function format() on string in /in/HJL4X:27 Stack trace: #0 [internal function]: {closure}(Array, Array) #1 /in/HJL4X(26): usort(Array, Object(Closure)) #2 {main} thrown in /in/HJL4X on line 27
Process exited with code 255.

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:
32.75 ms | 401 KiB | 8 Q