For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > June 2005 > Re: [PEAR] DB_DataObject question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] DB_DataObject question
Justin Patrin

2005-06-08, 8:57 pm

On 6/8/05, Daniel Testa <dan@sbrha.org> wrote:
> Which versions of php is DB_Dataobject compatible with? I have one
> website that runs with php 5 and everything works great and happy. I
> migrated most of my core code to another web server running php 4.3.11.
> Doing this causes my php scripts to die whenever they try and use any of
> the auto generated class files made by createTables.php. They get parse
> errors.
>=20
> The error
>=20
> Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION
> or T_FUNCTION or T_VAR or '}' in
> /home/crazyl2/include/DataObjects/Chr_characters.php on line 12
>=20
>=20
>=20
> Can DB_dataobject run in 4.3.11? All the auto generated files come from
> the php 5 server so could that have something to do with it?
>=20


DB_DO works fine with PHP4. However, if you use the generator in PHP5
the generated files will have PHP5 syntax (public instead of var). If
you change all of the "public" var declarations to use PHP4 syntax you
should be fine.

--=20
Justin Patrin
Joe Stump

2005-06-08, 8:57 pm

Simple rant ...

Would it be too much to ask for PHP developers to alias public/
private/static/const/etc. to "var" in a PHP4 release? How about
ignoring said keywords before "function" too? Too much to ask? I'd
think aliasing "private" to "var" in a PHP4 version wouldn't be THAT
big of a deal.

Of course, then you have people reading code running on PHP4 that
looks like PHP5 code, but doesn't behave as such, but MAN would that
make my life a buttload easier as I migrate about 50,000 lines of
code from PHP4 -> PHP5.

--Joe


On Jun 8, 2005, at 1:48 PM, Justin Patrin wrote:

> On 6/8/05, Daniel Testa <dan@sbrha.org> wrote:
>
>
> DB_DO works fine with PHP4. However, if you use the generator in PHP5
> the generated files will have PHP5 syntax (public instead of var). If
> you change all of the "public" var declarations to use PHP4 syntax you
> should be fine.
>
> --
> Justin Patrin
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com