3v4l.org

run code in 300+ PHP versions simultaneously
<?php class array_sort { protected $_asort; public function __construct(array $asort) { $this->_asort = $asort; } public function alhsort() { $sorted = $this->_asort; sort($sorted); return $sorted; } } $sortarray = new array_sort(array(11, -2, 4, 35, 0, 8, -9)); print_r($sortarray->alhsort()); ?>

preferences:
38.9 ms | 402 KiB | 5 Q