From: Kevin Israel Date: Tue, 14 Jun 2016 04:26:29 +0000 (-0400) Subject: FormatMetadata: Use binary integer literals instead of bindec() X-Git-Tag: 1.31.0-rc.0~6621^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=890c82f41970b7117206af05c50c9cbd0a192152;p=lhc%2Fweb%2Fwiklou.git FormatMetadata: Use binary integer literals instead of bindec() We can do this now that we have dropped support for PHP 5.3. Change-Id: I1e78249e244105496e976bf01e35f4067410b2f0 --- diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 5fbdcc7fe6..78b029693c 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -418,12 +418,12 @@ class FormatMetadata extends ContextSource { case 'Flash': $flashDecode = [ - 'fired' => $val & bindec( '00000001' ), - 'return' => ( $val & bindec( '00000110' ) ) >> 1, - 'mode' => ( $val & bindec( '00011000' ) ) >> 3, - 'function' => ( $val & bindec( '00100000' ) ) >> 5, - 'redeye' => ( $val & bindec( '01000000' ) ) >> 6, - // 'reserved' => ( $val & bindec( '10000000' ) ) >> 7, + 'fired' => $val & 0b00000001, + 'return' => ( $val & 0b00000110 ) >> 1, + 'mode' => ( $val & 0b00011000 ) >> 3, + 'function' => ( $val & 0b00100000 ) >> 5, + 'redeye' => ( $val & 0b01000000 ) >> 6, + // 'reserved' => ( $val & 0b10000000 ) >> 7, ]; $flashMsgs = []; # We do not need to handle unknown values since all are used.