php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #73499 Document needs updating
Submitted: 2016-11-11 14:53 UTC Modified: 2016-11-11 14:55 UTC
From: chris_garand at hotmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 7.0.13 OS: Ubuntu 16.04.1 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chris_garand at hotmail dot com
New email:
PHP Version: OS:

 

 [2016-11-11 14:53 UTC] chris_garand at hotmail dot com
Description:
------------
---
From manual page: http://www.php.net/control-structures.while
---
According to the documentation(and many old comments), having a space between the while keyword and the expression is legal. This seems to no longer be the case, so a direct use of the while loop example would not work with a recent build of PHP.
Documented-
while (expr):
    statement
    ...
endwhile;

Functional-
while(expr):
    statement
    ...
endwhile;


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-11-11 14:55 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-11-11 14:55 UTC] requinix@php.net
It is definitely still the case. Make sure you didn't accidentally type a non-breaking space in your own code.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 16:01:23 2020 UTC