Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c
| From: | Andi Gutmans | Date: | Tue, 16 Aug 2005 20:36:28 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18185@lists.php.net to get a copy of this message | ||
IIRC if unicode_semnantics=on, we agreed to use Unicode for array offsets and properties (and do auto-conversion). however, if unicode = off, we should not do auto conversion but allow php users to manually create unicode data. when it comes to arrays we agreed that in this case they can use strings and unicode as they wish (makes sense for apps that can't make the complete move but can unicode-enable some of the app, for example, a web service).
so bottom line, i dont think we can expect class name and property to be in the same encoding unless we hard code it, but i like the flexibility of being able to use unicode strings when unicode_semantics is off....
(this took me far too long to write :)
At 10:30 AM 8/16/2005 -0700, Andrei Zmievski wrote:
Hmm, should we allow this? It is much easier to deal with having common identifier type everywhere. -Andrei On Aug 15, 2005, at 11:41 PM, Dmitry Stogov wrote:You aren't right. It is posiible to have unicode property in non-unicode mode (class name is string and property name is unicode). <?php $obj = new stdClass(); $obj->{(unicode)"asd"} = 1; var_dump($obj); ?> Dmitry.-----Original Message----- From: Marcus Boerger [mailto:helly@php.net] Sent: Monday, August 15, 2005 11:36 PM To: Dmitry Stogov Cc: zend-engine-cvs@lists.php.net Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c Hello Dmitry, ah that's the point i didn't get. Anyway still prop_name and class_name are the same string type so still it should be zend_printf("%R:%R:private", ztype, prop_name, ztype, class_name); instead of zend_printf("%R:%v:private", ztype, prop_name, class_name); can you please check? regards marcus Monday, August 15, 2005, 4:43:49 PM, you wrote:-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpIn unicode mode class_names are always unicode.The key_type is not IS_UNICODE but ZEND_HASH_KEY_UNICODE inthis code.Dmitry.http://cvs.php.net/diff.php/ZendEngine2/zend.c?r1=1.314&r2=1.315&ty=u-----Original Message----- From: Marcus Boerger [mailto:helly@php.net] Sent: Monday, August 15, 2005 12:34 PM To: Dmitry Stogov Cc: zend-engine-cvs@lists.php.net Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend.c Hello Dmitry, what does this fix? The names are stored in the same value and thus should either be both unicode or native strings. Did you find something else? marcus Monday, August 15, 2005, 9:12:55 AM, you wrote:dmitry Mon Aug 15 03:12:55 2005 EDTModified files:/ZendEngine2 zend.cLog: Fixed another print_r() bug-- Zend Engine CVS Mailing List (http://cvs.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpIndex: ZendEngine2/zend.c diff -u ZendEngine2/zend.c:1.314 ZendEngine2/zend.c:1.315+------------------------------------------------------------- ---------+--- ZendEngine2/zend.c:1.314 Mon Aug 15 02:34:20 2005+++ ZendEngine2/zend.c Mon Aug 15 03:12:52 2005 @@ -17,7 +17,7 @@*/-/* $Id: zend.c,v 1.314 2005/08/15 06:34:20 dmitry Exp $ */ +/* $Id: zend.c,v 1.315 2005/08/15 07:12:52 dmitry Exp $ */#include "zend.h" #include "zend_extensions.h" @@ -276,7 +276,7 @@class_name);if(class_name[0]=='*') { zend_printf("%R:protected", ztype, prop_name);} else {- zend_printf("%R:%R:private", ztype, prop_name, key_type,+ zend_printf("%R:%v:private", ztype, prop_name, class_name);} } else { zend_printf("%R",ztype, prop_name);