php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42504 'switch' manual page
Submitted: 2007-08-31 18:38 UTC Modified: 2007-08-31 19:52 UTC
From: aya at eh dot org Assigned: bjori (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2007-08-31 18:38 UTC] aya at eh dot org
Description:
------------
w.r.t. 'bug' #42503, would it not be prudent to include a warning in the 'switch' manual page regarding this behaviour, especially considering the number of times this 'bug' has been reported?

Also, w.r.t. bjori@php.net's comment about not changing PHP's behaviour for reasons of backwards-compatibility, is it not policy, like the development of other languages, to allow non-backwardly-compatible changes even between major version updates (e.g. from PHP5 to PHP6)? If not, you may be stuck with somewhat undesirable language 'features' forever.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-31 19:52 UTC] bjori@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I was so sure this was already documented that I didn't even bother checking the manual, sorry :]


I've added a note at the top of the switch man page; "Note that switch/case does loose comparision." with a link to the "Loose comparisons with ==" table at php.net/types.comparisons (and added anchors to those tables).

-Hannes
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Nov 20 15:00:01 2025 UTC