[wp-trac] [WordPress Trac] #45854: Avoid printf/sprintf strings to be "double-quoted"
WordPress Trac
noreply at wordpress.org
Tue Jan 8 10:49:50 UTC 2019
#45854: Avoid printf/sprintf strings to be "double-quoted"
-----------------------------+------------------------------
Reporter: arena | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch close | Focuses:
-----------------------------+------------------------------
Comment (by arena):
Replying to [comment:1 chriscct7]:
> Do you have a modern benchmark showing it is faster?
>
> When there is no variable present in the string, PHP will use
**identical** opcodes for the string if its a single vs double, so there's
no difference in performance.
"When there is no variable present in the string" means that PHP has to
check if there is no !!!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45854#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list