faqts : Computers : Programming : Languages : PHP : kms : Functions

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 7 people (86%) answered Yes
Recently 5 of 6 people (83%) answered Yes

Entry

Do functions have to be defined before they are used?

Jan 28th, 2000 00:45
Nathan Wallace, Lars Torben Wilson, Ulf Wendel


In PHP3, yes; in PHP4, no.

More information is at: http://www.php.net/manual/functions.php3

Classes are an exception to this rule. It does'nt matter in what order
you define your methods and even the constructor. The parser treads
classes completely different. The whole class gets loaded and the
function table is rebuild before the constructor is called.