Re: Re: MDB2 Extended module in PHP4
| From: | Justin Patrin | Date: | Thu, 02 Feb 2006 21:15:49 +0000 |
| Subject: | Re: Re: MDB2 Extended module in PHP4 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41185@lists.php.net to get a copy of this message | ||
On 2/2/06, Lukas Smith <lsmith@php.net> wrote:
> Stoyan Stefanov wrote:
> > Hi guys,
> >
> > I have this code:
> > $db->loadModule('Extended');
> > $result = $db->autoExecute(
> > 'tablename',
> > $data,
> > MDB2_AUTOQUERY_INSERT
> > );
> >
> > Works as expected in PHP5, but I get an error in PHP4 (tested
> > 4.4.1-pl1 and 4.4.2). The error is that autoExecute() is not defined.
> >
> > "Fatal error: Call to undefined function: autoexecute() "
> >
> > I just tried echo-ing a line in Extended.php and it was displayed, so
> > Extended.php is included.
> >
> > Should I log this as a bug?
>
> No this is not a bug. PHP4 does not support overloading. Therefore you
> need to do:
Rather PHP4 *does* have overloading, but it's buggy as hell and should
have never been released. Its main drawback is that it breaks normal
pass-by-ref in overloaded classes.
>
> $db->loadModule('Extended');
> $result = $db->extended->autoExecute(
> 'tablename',
> $data,
> MDB2_AUTOQUERY_INSERT
> );
>
--
Justin Patrin