Edit report at https://bugs.php.net/bug.php?id=62182&edit=1
ID: 62182 Comment by: ni...@php.net Reported by: noel_fb at hotmail dot com Summary: Default Parameter not to be $_GET or $_POST Status: Open Type: Bug Package: *General Issues Operating System: Red Hat PHP Version: Irrelevant Block user comment: N Private report: N New Comment: This has nothing to do with $_GET or $_POST. Default arguments simply can only be static scalars, variables are not allowed in general. Previous Comments: ------------------------------------------------------------------------ [2012-05-29 11:56:00] noel_fb at hotmail dot com Description: ------------ Hello. Try: function prueba($metodos = array($_GET, $_POST)){ } or function prueba($metodos = array($_GET)){ } ERROR: Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in /var/www/html/app/xxx/xxx.php on line xx Test script: --------------- Try: function prueba($metodos = array($_GET, $_POST)){ } or function prueba($metodos = array($_GET)){ } ERROR: Parse error: syntax error, unexpected T_VARIABLE, expecting ')' in /var/www/html/app/xxx/xxx.php on line xx Expected result: ---------------- Not error ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62182&edit=1