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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
9 + 43 = ?
Subscribe to this entry?

 
 [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: Fri Apr 19 16:01:27 2024 UTC