[wp-trac] [WordPress Trac] #48083: Use `**` operator to replace`pow()` function calls
WordPress Trac
noreply at wordpress.org
Sat Sep 21 01:02:27 UTC 2019
#48083: Use `**` operator to replace`pow()` function calls
-------------------------+--------------------------------------------
Reporter: ayeshrajans | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: trivial | Resolution:
Keywords: has-patch | Focuses: performance, coding-standards
-------------------------+--------------------------------------------
Comment (by jrf):
Hi @ayeshrajans Yet another good idea ;-)
Reviewed & the changes themselves look ok, the patch just needs one space
on the inside of the parentheses on both changed lines.
{{{#!php
<?php
if ( 8 < $size / ( 1024 ** 2 ) ) {
$size = KB_IN_BYTES ** ( $log - $power )
}}}
Also saw you opened the PR to SimplePie 👍🏻.
Adding the link here for reference:
https://github.com/simplepie/simplepie/pull/622
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48083#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list