[wp-trac] [WordPress Trac] #42918: Replace intval(), strval(), ... function calls with type casts

WordPress Trac noreply at wordpress.org
Thu Oct 8 21:14:14 UTC 2020


#42918: Replace intval(), strval(), ... function calls with type casts
-------------------------+-----------------------------
 Reporter:  ayeshrajans  |       Owner:  SergeyBiryukov
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  5.6
Component:  General      |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"49108" 49108]:
 {{{
 #!CommitTicketReference repository="" revision="49108"
 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.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42918#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list