Join Up!
104887 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousError reportingempty("0")next
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German

Initializers

Static variable and class member initializers only accept scalar values while in PHP 3 they accepted any valid expression. This is, once again, due to the split between parsing and execution as no code has yet been executed when the parser sees the initializer.

For classes you should use constructors to initialize member variables instead. For static variables anything but a simple static value rarely makes sense anyway.

User Contributed Notes
Initializers
add a note about notes
There are no user contributed notes for this page.
previousError reportingempty("0")next
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST