BC fix for __call definition. (Bug #29716) + pear bug #2136

php.internals

Alan Knowles

22 years ago
Attached (hopefully) should be a fix for bug #29716, allowing 3 arguments for __call, but emitting a E_STRICT error. This is needed to enable simple BC wrappers to be written for code wanting to use overload in PHP4. BTW: Notes on current CVS flex 2.5.31 currently reports flex: fatal internal error, bad line in skeleton file flex 2.5.4: works OK (debian package flex-old) /ext/standard/unserializer.c needs touching, otherwise re2c tries to generate it (and fails here) Zeev/Andi could you OK it?, marcus is ok with the principle (although he hasnt seen the code) Regards Alan

Andi Gutmans

22 years ago
I actually don't think it's the right approach. ext/overload has always been experimental and it doesn't make sense to start putting such a hack into the engine. You can easily change the code to use conditional includes and therefore, your PHP 4 version won't be compiled under PHP 5. Do you know how many PEAR classes are actually affected by this? Andi At 08:58 PM 8/19/2004 +0800, Alan Knowles wrote:

Alan Knowles

22 years ago
Andi Gutmans wrote:
> I actually don't think it's the right approach. ext/overload has > always been experimental and it doesn't make sense to start putting > such a hack into the engine.
Normally that would make sense, but the change is realitively minor, and it would reduce the necessity to upgrade libraries for alot of users.
> You can easily change the code to use conditional includes and > therefore, your PHP 4 version won't be compiled under PHP 5.
I guess so this may end up being the only option, other than kludgy evals, it's just a bit of a shame to have to include a file for just for 5 lines of code.
> Do you know how many PEAR classes are actually affected by this?
2 PEAR classes XML_FastCreate and DB_DataObject. Regards Alan

Andi Gutmans

22 years ago
At 10:29 AM 8/20/2004 +0800, Alan Knowles wrote:
>Andi Gutmans wrote: > >>I actually don't think it's the right approach. ext/overload has always >>been experimental and it doesn't make sense to start putting such a hack >>into the engine. > >Normally that would make sense, but the change is realitively minor, and >it would reduce the necessity to upgrade libraries for alot of users. > >>You can easily change the code to use conditional includes and therefore, >>your PHP 4 version won't be compiled under PHP 5. > >I guess so this may end up being the only option, other than kludgy evals, >it's just a bit of a shame to have to include a file for just for 5 lines >of code. > >>Do you know how many PEAR classes are actually affected by this? > >2 PEAR classes XML_FastCreate and DB_DataObject.
Two are very few. I don't think eval's with heredocs would be that kludgy. At least not for such a small amount of classes. Andi