PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php class Test { public function sort(Carbon $a, Carbon $b) { return $a <=> $b; } } $t = new Test(); $arr = []; usort( $arr, function($a, $b) use $t {return $t->sort($a, $b);} );
Show:  
Copy Clear