Re: Classes and functions

From: Date: Wed, 28 Nov 2001 10:36:43 +0000
Subject: Re: Classes and functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75872@lists.php.net to get a copy of this message
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" <daniel.reichenbach@pixum.com> To: "Php-General" <php-general@lists.php.net> 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#75872) next »