Make WordPress Core


Ignore:
Timestamp:
10/08/2020 09:13:57 PM (4 years ago)
Author:
SergeyBiryukov
Message:

General: Replace older-style PHP type conversion functions with type casts.

This improves performance, readability, and consistency throughout core.

  • intval()(int)
  • strval()(string)
  • floatval()(float)

Props ayeshrajans.
Fixes #42918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-matchesmapregex.php

    r48110 r49108  
    8484     */
    8585    public function callback( $matches ) {
    86         $index = intval( substr( $matches[0], 9, -1 ) );
     86        $index = (int) substr( $matches[0], 9, -1 );
    8787        return ( isset( $this->_matches[ $index ] ) ? urlencode( $this->_matches[ $index ] ) : '' );
    8888    }
Note: See TracChangeset for help on using the changeset viewer.