Re: OOP and Future of PHP
| From: | Rasmus Lerdorf | Date: | Wed, 25 Apr 2001 16:43:21 +0000 |
| Subject: | Re: OOP and Future of PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50320@lists.php.net to get a copy of this message | ||
> The only thing that I feel lack of in PHP is the real Object Oriented
> stuff, such as information hiding in the object in classes i.e. private and
> public variables, methods/functions.
>
> This in a sene make it really difficult for developer to build an API for
> other developers that is secure. I myself have this problem. Is there any
> reasons why PHP was designed like this from the beginning? Is this issue
> going to be addresses somehow in the future? Anyone has any idea?
It was designed like this because PHP was designed as a procedural
language and not an object oriented one.
> If anyone has any idea, or tricks to hide information in a variables or
> method in a class, or in other words, make a variable or method a private,
> I would really like to know. Thanks for any comments.
PHP also doesn't have introspection, so there isn't a good way for people
to see what is in your API so a bit of obscurity should hide things for
you.
-Rasmus