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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 17:01:35 2025 UTC