php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60610 Allow functions without Parentheses
Submitted: 2011-12-26 22:39 UTC Modified: 2011-12-27 02:28 UTC
Votes:4
Avg. Score:3.5 ± 1.7
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: valentiny510 at yahoo dot es Assigned:
Status: Wont fix Package: *General Issues
PHP Version: 5.3.8 OS: windows
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: valentiny510 at yahoo dot es
New email:
PHP Version: OS:

 

 [2011-12-26 22:39 UTC] valentiny510 at yahoo dot es
Description:
------------
I think will be nice and clean feature to be able to write functions without arguments with no parentheses like:

function ExampleFunction { /* etc.. */ }

instead of

function ExampleFunction () { /* etc ..*/ }

The parentheses here have no sense in my opinion. Thank you


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-26 23:17 UTC] valentiny510 at yahoo dot es
class Example {}
trait example {}
interface Example {}
etc.. why not..
function example {}
 [2011-12-26 23:32 UTC] pajoye@php.net
As I can already say that this feature will be rejected, you can still try on 
internals and using a RFC, but don't hold your breath for a positive answer. This 
change brings zero gain.
 [2011-12-27 02:28 UTC] laruence@php.net
PHP was not Perl, and will not to be it too :)
 [2011-12-27 02:28 UTC] laruence@php.net
-Status: Open +Status: Wont fix
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 30 17:00:02 2025 UTC