Take the following example:
includeTest.php:
<?
class testObject {
function testObject() {
include("test.php");
}
}
$test1 = new testObject();
$test2 = new testObject();
?>
test.php:
<?
function testFunction() {
echo "test";
return;
}
?>
When executing this script, i get an error:
Fatal error: Cannot redeclare testfunction() in /home/jsisson/www/concept/test.php on line 2
Now...since test1 and test2 are two different objects, why is testFunction being redeclared?