php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65335 Doc layout for bitwise operators is broken
Submitted: 2013-07-25 14:23 UTC Modified: 2013-10-17 04:05 UTC
From: peter dot e dot lind at gmail dot com Assigned:
Status: No Feedback Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: peter dot e dot lind at gmail dot com
New email:
PHP Version: OS:

 

 [2013-07-25 14:23 UTC] peter dot e dot lind at gmail dot com
Description:
------------
The examples of bitwise operators that take E_* constants at outset have broken 
layout and could use a quick cleanup. They look very odd as is and should 
probably just be formatted as normal examples


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-09 07:36 UTC] datibbaw@php.net
-Status: Open +Status: Feedback
 [2013-10-09 07:36 UTC] datibbaw@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Could you provide a screenshot that highlights the issue?
 [2013-10-09 07:49 UTC] peter dot e dot lind at gmail dot com
Bug seems to have been fixed - I can't see it anymore anyway, so this should just be closed
 [2013-10-09 07:58 UTC] gabri dot ns at gmail dot com
what he mean probably this.
http://php.net/operators.bitwise
http://pbs.twimg.com/media/BWHpBpkCEAAym94.png

even tough the upper part is mean to be an explanation,
some poeple think it as an example. all of them using
monospace font, so it is strange.

my propose is:
<!-- this use normal style -->
PHP's error_reporting ini setting uses bitwise values,
providing a real-world demonstration of turning
bits off. To show all errors, except for notices,
the php.ini file instructions say to use:
E_ALL & ~E_NOTICE

<!-- this use boxed monospace font, like the output
part at the bottom of the page -->
This works by starting with E_ALL:
00000000000000000111011111111111
Then taking the value of E_NOTICE...
00000000000000000000000000001000
... and inverting it via ~:
11111111111111111111111111110111
Finally, it uses AND (&) to find the bits turned
on in both values:
00000000000000000111011111110111

<!-- this use normal style -->
Another way to accomplish that is using XOR (^)
to find bits that are on in only one value or the other:
E_ALL ^ E_NOTICE
      
error_reporting can also be used to demonstrate turning bits on.
The way to show just errors and recoverable errors is:
E_ERROR | E_RECOVERABLE_ERROR

<!-- this use monospace font again -->      
This process combines E_ERROR
00000000000000000000000000000001
and
00000000000000000001000000000000
using the OR (|) operator
to get the bits turned on in either value:
00000000000000000001000000000001
 [2013-10-09 08:59 UTC] peter dot e dot lind at gmail dot com
No, the layout was decidedly broken - didn't check why but best guess was broken html. The examples were flowing together in a manner where you couldn't tell example and text apart.
 [2013-10-17 04:05 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC