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/http.php

    r48121 r49108  
    669669function wp_parse_url( $url, $component = -1 ) {
    670670    $to_unset = array();
    671     $url      = strval( $url );
     671    $url      = (string) $url;
    672672
    673673    if ( '//' === substr( $url, 0, 2 ) ) {
Note: See TracChangeset for help on using the changeset viewer.