3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { private $a = [ 'foo-test' => [1], '-' => [2], 'bar-test' => [3] ]; private function _mySort($x, $y) { var_dump($this->a); return $x < $y; } public function __construct() { uksort($this->a, [$this, '_mySort']); } } new myClass();
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["foo-test"]=> array(1) { [0]=> int(1) } ["-"]=> array(1) { [0]=> int(2) } ["bar-test"]=> array(1) { [0]=> int(3) } } Deprecated: uksort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/9n9sX on line 19 array(3) { ["foo-test"]=> array(1) { [0]=> int(1) } ["-"]=> array(1) { [0]=> int(2) } ["bar-test"]=> array(1) { [0]=> int(3) } } array(3) { ["foo-test"]=> array(1) { [0]=> int(1) } ["-"]=> array(1) { [0]=> int(2) } ["bar-test"]=> array(1) { [0]=> int(3) } } array(3) { ["foo-test"]=> array(1) { [0]=> int(1) } ["-"]=> array(1) { [0]=> int(2) } ["bar-test"]=> array(1) { [0]=> int(3) } } array(3) { ["foo-test"]=> array(1) { [0]=> int(1) } ["-"]=> array(1) { [0]=> int(2) } ["bar-test"]=> array(1) { [0]=> int(3) } }

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:
58.65 ms | 403 KiB | 8 Q