3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sortables = ['admin11class', 'adminclass12', '13adminclass']; usort($sortables, function($a, $b) { preg_match_all('!\d+!', $a, $matchesA); preg_match_all('!\d+!', $b, $matchesB); return $matchesA[0] > $matchesB[0]; }); var_dump($sortables);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /in/DN315 on line 5 array(3) { [0]=> string(12) "admin11class" [1]=> string(12) "adminclass12" [2]=> string(12) "13adminclass" }

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:
133.6 ms | 406 KiB | 5 Q