* - stream : resource to stream the HTTP response body to
* Request maps can use integer index 0 instead of 'method' and 1 instead of 'url'.
*
- * @author Aaron Schulz
* @since 1.23
*/
class VirtualRESTServiceClient {
$cmpFunc = function ( $a, $b ) {
$al = substr_count( $a, '/' );
$bl = substr_count( $b, '/' );
- if ( $al === $bl ) {
- return 0; // should not actually happen
- }
- return ( $al < $bl ) ? 1 : -1; // largest prefix first
+ return $bl <=> $al; // largest prefix first
};
$matches = []; // matching prefixes (mount points)