php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42688 Alternative syntax for control structures
Submitted: 2007-09-17 17:51 UTC Modified: 2016-01-15 14:31 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: php dot net at eoasys dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.4 OS: Irrelevant
Private report: No CVE-ID: None
 [2007-09-17 17:51 UTC] php dot net at eoasys dot com
Description:
------------
I find the alternative syntax for control structures quite useful and use them exclusively in all my code. My only wish is that they become available for all similar structures. Obvious ones which come to mind are Function and Class.


It has been said that:

"The 'endif;' stuff is old legacy syntax and is definitely not the
recommended way of doing things."

It seems to me that the "{...}" form goes a ways back as well. Is the alternative syntax really frowned upon? What kind of trouble might be caused by it's use?

Thanks,
Richard



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-15 14:31 UTC] danack@php.net
-Status: Open +Status: Not a bug -Package: Feature/Change Request +Package: *General Issues
 [2016-01-15 14:31 UTC] danack@php.net
I don't think this is a bug report.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC