Working with some OOP, I had an error that I have now traced to inistantiation of a class when the file in which the class is contained is included in any other file. Is this the default/normal behaviour of php, and how do I get myself out of this? I want to create an instance of the class at my own time.
classfile.php
<?php
Class Bibiana{
Function __Construct(){
print "I love you \n";
}
Class Wed{
Function __Construct(){
print "And I want to marry you \n";
print "\t Yours \n";
print "\t Onang'o \n";
}
#...
?>
Index.php
#include 'classfile.class.php';
Output of index.php
I love you
And I want to marry you
Onang'o
Yours