ID: 28699 User updated by: D dot Kingma at jool dot nl Reported By: D dot Kingma at jool dot nl Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5.0.0RC3 Assigned To: helly New Comment:
Thnx, I will post the small feature request in a sepperate 'bug report'. Previous Comments: ------------------------------------------------------------------------ [2004-06-10 13:48:04] [EMAIL PROTECTED] BTW: The '/**' is another issue (which i also fixed). Please fill in separate bug reports for separate things in the future. ------------------------------------------------------------------------ [2004-06-10 13:37:57] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2004-06-10 13:10:18] D dot Kingma at jool dot nl Also in RC3 ------------------------------------------------------------------------ [2004-06-10 13:09:05] D dot Kingma at jool dot nl reproduction code: <?php class testReflection{ var $CAPS; var $lower; } //throws an exception, while it should not $x=new reflectionProperty('testReflection','CAPS'); //works as expected $y=new reflectionProperty('testReflection','lower'); /* Same for when you reference an object, instead of giving the name of the class */ $test=new testReflection(); //throws an exception, while it should not $x2=new reflectionProperty($test,'CAPS'); //works as expected $y2=new reflectionProperty($test,'lower'); ?> Possible solution for the CAPS problem: The properties hash table ce->properties_info probably keeps the property names in the origanal string format (didn't change it with tolower()). So the fix will probably be to remove the zend_str_tolower_copy (line 2729) [zend_reflection_api.c] 2728 lcname = do_alloca(name_len + 1); 2729 zend_str_tolower_copy(lcname, name_str, name_len); 2730 if (zend_hash_find(&ce->properties_info, lcname, name_len + 1, (void **) &property_info) == FAILURE) { 2731 free_alloca(lcname); 2732 zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, 2733 "Property %s::$%s does not exist", ce->name, name_str); 2734 return; 2735 } ------------------------------------------------------------------------ [2004-06-09 11:05:08] D dot Kingma at jool dot nl changed category to 'Zend engine 2 problem' ------------------------------------------------------------------------ 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 http://bugs.php.net/28699 -- Edit this bug report at http://bugs.php.net/?id=28699&edit=1
