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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC