|
|
Improved Error Messages in PHP 5 - PHP
|
Views : 274
|
|
Tagged in : PHP
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
In PHP 4.4.7,if you run the following code,
< ?php
function test($arg) { echo "function executed"; }
test();
?>
You get the following message:
Warning: Missing argument 1 for test() in /usr/bin/- on line 2
The error message here is reported at the position of the definition of the function, but really the error was in how the function was called. The required parameter to test was not passed.
However, if you run the same code in PHP 5:
Warning: Missing argument 1 for test(), called in /Users/jeff/- on line 3 and defined in /users/username/- on line 2 |
|
By Rekha, On - 2010-01-28 |
|
|
|