3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<pre>"; $activeSkillList = new ArrayObject(); $activeSkillList['U1_1021002'] = array('refCardId'=> 'U1_1021002'); $activeSkillList['U3_1052005'] = array('refCardId'=> 'U3_1052005'); print_r($activeSkillList); $tmp = $activeSkillList->getArrayCopy(); print_r($tmp); uasort($tmp, function($skill1, $skill2) { return $skill1['refCardId'] - $skill2['refCardId']; }); print_r($tmp);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>ArrayObject Object ( [storage:ArrayObject:private] => Array ( [U1_1021002] => Array ( [refCardId] => U1_1021002 ) [U3_1052005] => Array ( [refCardId] => U3_1052005 ) ) ) Array ( [U1_1021002] => Array ( [refCardId] => U1_1021002 ) [U3_1052005] => Array ( [refCardId] => U3_1052005 ) ) Fatal error: Uncaught TypeError: Unsupported operand types: string - string in /in/X2ILL:13 Stack trace: #0 [internal function]: {closure}(Array, Array) #1 /in/X2ILL(12): uasort(Array, Object(Closure)) #2 {main} thrown in /in/X2ILL on line 13
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:
48.13 ms | 402 KiB | 8 Q