3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('2013-02-01','2000-02-01','2016-02-17','0000-00-00','0000-00-00','0000-00-00'); sort( $arr ); usort( $arr, function( $a, $b ) { if ( $a === $b ) return 0; if ( strpos( $b, '0000' ) !== false ) return -1; return ( $a < $b ) ? -1 : 1; }); print_r( $arr );
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 0000-00-00 [1] => 0000-00-00 [2] => 0000-00-00 [3] => 2000-02-01 [4] => 2013-02-01 [5] => 2016-02-17 )

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:
45.23 ms | 405 KiB | 5 Q