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
 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 08:01:28 2025 UTC