php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #53020 a suggestion about function define
Submitted: 2010-10-08 04:17 UTC Modified: 2010-10-08 05:01 UTC
From: dev at kbonez dot net Assigned:
Status: Wont fix Package: Unknown/Other Function
PHP Version: Irrelevant OS:
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: dev at kbonez dot net
New email:
PHP Version: OS:

 

 [2010-10-08 04:17 UTC] dev at kbonez dot net
Description:
------------
dear,all:
   I think add a feature that "add arguments directly" will be awesome, like  
these functions "echo , require , include ". may be you can't understand my mean, 
please let me show examples below.

 echo can use like this 
         echo("string") 
 and also can call it like this syntax, 
         echo "string";
 
function "include" and "require" can support this syntax too. "require 'file'".

it is useful for Program readability  I think.

so, can you add this feature in define function for user?

Expected result:
----------------
user_function "arg1" "arg2";

Actual result:
--------------
user_function("arg1","arg2");

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-08 05:01 UTC] aharvey@php.net
-Status: Open +Status: Wont fix
 [2010-10-08 05:01 UTC] aharvey@php.net
PHP isn't Perl, thank God -- function calls are explicit, obvious, and require parentheses. The reason echo, include and require don't need parentheses is only because they're language constructs, not functions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC