Re: Simple class declaration returns error
| From: | Jochem Maas | Date: | Wed, 14 Jun 2006 18:19:09 +0000 |
| Subject: | Re: Simple class declaration returns error | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237996@lists.php.net to get a copy of this message | ||
Dave M G wrote:
> Brad,
>> What version of PHP are you using?
>> I suspect something less then 5.0 which means the public/private
>> declarations are not supported...
>> (So remove 'public' and see if it works)
>
> Yes, it turns out that I am using PHP 4, and I thought I was using 5.
> Thank you for pointing it out.
>
> Now I have to consider whether or not to make my code PHP 4 compatible,
> or upgrade to version 5.
I wouldn't bother with php4 objects if your only just starting out now -
by the time you really get the hang of objects php6 will probably be making an
entrance.
BUT starting with objects in php5 doesn't mean you have to dive right in
and use stuff like public/private/protected ... and stuff like interfaces...
they'll probably just take all the fun out of it when your just starting out.
jmho.
>
> --
> Dave M G
>