There is something like RFC on this URL :http://www.zend.com/engine2/ZendEngine-2.0.pdf
What is supposed to be new in Zend Engine 2.0 . private members, and other things.
But now everything is public. Why? Because every variable in PHP is zval (zend 
value).PHP is built on the top of Zend using Zend
API.
Simply the structure of zval is not suitable for private members. The cast from array 
to object and vice versa is possible. When you
cast array to
object your receive an instace with properties - array_keys() with correspoding values 
- array_values(). When you cast from object
to array, the names of the properties are key names, the values of the keys - values.
>From zend.h
/*
 * zval
 */
typedef struct _zval_struct zval;
typedef struct _zend_class_entry zend_class_entry;

typedef struct _zend_object {
 zend_class_entry *ce;
 HashTable *properties;
} zend_object;

typedef union _zvalue_value {
 long lval;     /* long value */
 double dval;    /* double value */
 struct {
  char *val;
  int len;
 } str;
 HashTable *ht;    /* hash table value */
 zend_object obj;
} zvalue_value;


struct _zval_struct {
 /* Variable information */
 zvalue_value value;  /* value */
 zend_uchar type; /* active type */
 zend_uchar is_ref;
 zend_ushort refcount;
};

Regars,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

----- Original Message -----
From: "Daniel Reichenbach" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 12:17 PM
Subject: [PHP] Classes and functions


> Hy,
>
> I'm writing a class for POP3 access and I want some of the internal
> functions to be private, like the mime decoding stuff.
>
> Is there any way to do this? I found nothing in the docs :(
>
> Daniel
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to