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/tests/phpunit/tests/term/wpSetObjectTerms.php

    r48939 r49108  
    146146            for ( $i = 0; $i < 3; $i++ ) {
    147147                $term                    = get_term_by( 'name', $terms[ $i ], $this->taxonomy );
    148                 $term_id[ $terms[ $i ] ] = intval( $term->term_id );
     148                $term_id[ $terms[ $i ] ] = (int) $term->term_id;
    149149            }
    150150        }
Note: See TracChangeset for help on using the changeset viewer.