Mombu 2012-07-10 23:24:25
Updated by: firstname.lastname@example.org
Reported By: piotrek dot pokora at gmail dot com
Bug Type: Variables related
Operating System: debian/linux
PHP Version: 5.2.1
No, this is a list when I’m ready to explain any question regarding
Zend Engine sources to a person who haven’t ever heard of respect.
Stop ranting and grasp the facts.
————————————————————————[2007-02-15 09:32:19] piotrek dot pokora at gmail dot com
Is this a list for reporting ZEND bugs?
function: static void print_hash(HashTable *ht, int indent, zend_bool
ZEND_PUTS(“] => “);
zend_print_zval_r(*tmp, indent+PRINT_ZVAL_INDENT TSRMLS_CC);
`tmp` pointer is not a pointer for a zval returned by ANY
read_property. Neither standard nor user defined one.
If you are going to keep this bug with bogus status, I am going to
submit another one.
Logic and consistency is broken here. And this is absolutely a bug.
Behaviour of this function’s part is unchanged since ZEND1 engine.
————————————————————————[2007-02-15 09:03:05] email@example.com
————————————————————————[2007-02-14 20:51:42] piotrek dot pokora at gmail dot com
OK, let’s talk code.
GObject and GValue wrappers for a case we talk about:
midgard_config class constructor and methods:
PAY SPECIAL ATTENTION! There’s no get_properties hook function.
$a = new midgard_config();
/* $a has underlying GObject object so properties for this object are
already assigned */
[__res] => Resource id #8
[authtype] => 0
Do you see ‘MySQL’ value in print_r output?
Why then echo $a->dbtype; outputs MySQL? Even if I use standard ( not
defined by me ) get_properties handler??
Because language respect my read_property hook, isn’t it.
Do you want similiar code for derived class?
Or maybe you can look at zend_print_zval_r_ex and notice that
print_hash is used for IS_ARRAY and IS_OBJECT value type?
DO YOU SEE read_property hook invoked by print_hash function??
Maybe I misunderstood something here but this is not the fact that
IS_ARRAY != IS_OBJECT and zend_print_zval_r_ex
ignores completely user’s read_property hook.
————————————————————————[2007-02-14 17:20:07] firstname.lastname@example.org
A total misunderstanding on your side.
Yes. Just re-read your question.
“Why a function which prints ALL the properties does not use
read_property() requires “property_name” argument.
Care to imagine where it should be taken from? Out of your mind?
That’s why get_properties() exist – it returns the hashtable with ALL
To read a property specifed by the GIVEN NAME.
For me it’s obvious that you misunderstand the whole concept.
Please STOP using this bug tracking system as a forum for your
questions, use the mailing list instead.
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
Edit this bug report at http://bugs.php.net/?id=40477&edit=1