[thelist] PHP, functions, include() and precedence

John Handelaar john at videoisland.com
Thu Dec 11 11:06:30 CST 2003


Hi all

Let's say I have a PHP script (script.php) which includes two files
(functions.php and newerfunctions.php).

If both functions.php and newerfunctions.php have a function called
foo(), which foo() will I have when I call it in script.php:

*  The one called first?
*  The one called last?
*  Neither, because PHP will throw an error on the second include?

Oh, and for clarification, this is normal, non-OO PHP I'm talking
about here.  I know how to extend classes already :)


jh


More information about the thelist mailing list