|
Posted by Daz on 02/25/07 18:43
On Feb 25, 5:15 pm, "peter" <sub...@flexiwebhost.com> wrote:
> > Actually, PHP4 does support the mysqli object, also.
>
> > But in PHP5 your constructors are named __construct, not the class name.
> > So you need to change the constructor name in your class, and call
>
> > parent::construct(...)
>
> Just a correction of Jerry's post. As of php 5 the __constructor method was
> made available BUT the old constructor name is still useable.
>
> The class you are actually using (mysqli) does in fact use a contructor
> called mysqli as the following code snippet will demonstrate if you run it:-
>
> <?php
> function output_methods($obj)
> {
> $methods = get_class_methods($obj);
> foreach ($methods as $method)
> {
> echo "function $method()\n";
> }
>
> }
>
> output_methods("mysqli");
> ?>
I have just one more question. Seeing that you can print methods, how
would I print the code from a function?
Many thanks.
Daz.
[Back to original message]
|