|
Posted by Rik on 01/13/07 12:25
Manfred Kooistra wrote:
> Okay, understood: classes and objects
> (http://de.php.net/manual/en/language.oop.php).
>
> So why does this work:
>
> require('Class_definition.php');
> $object = new Class;
> $object->function_defined_in_class($something);
> other_function_defined_in_class($object);
>
> but not this:
>
> require('Class_definition.php');
> $object = new Class;
> while($something) {
> $object->function_defined_in_class($something);
> }
> other_function_defined_in_class($object);
It highly depends on the specific class offcourse. Normally it would work,
unless there's something else going on inside the class. Offcourse, it
would only work when $something is altered by the
function_defined_in_class, else it'd be an infinite loop....
--
Rik Wasmus
Navigation:
[Reply to this message]
|