diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2014-10-17 19:10:05 +0400 | 
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2014-10-17 19:10:05 +0400 | 
| commit | 7471c217810397f05ae7a8c518af80da7baf0f4a (patch) | |
| tree | 5ed4cee825e03914834ddaded78dc655c370a271 /ext/reflection | |
| parent | 9935bf7df70d8fcfa9ef5c2f47e1d760ffc3f666 (diff) | |
| download | php-git-7471c217810397f05ae7a8c518af80da7baf0f4a.tar.gz | |
Optimized property access handlers. Removed EG(std_property_info).
Diffstat (limited to 'ext/reflection')
| -rw-r--r-- | ext/reflection/php_reflection.c | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 57e11945c1..cc4ed54dea 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -3922,9 +3922,14 @@ static int _adddynproperty(zval *ptr TSRMLS_DC, int num_args, va_list args, zend  		return 0; /* non public cannot be dynamic */  	} -	if (zend_get_property_info(ce, hash_key->key, 1 TSRMLS_CC) == &EG(std_property_info)) { -		EG(std_property_info).flags = ZEND_ACC_IMPLICIT_PUBLIC; -		reflection_property_factory(ce, &EG(std_property_info), &property TSRMLS_CC); +	if (zend_get_property_info(ce, hash_key->key, 1 TSRMLS_CC) == NULL) { +		zend_property_info property_info; +		 +		property_info.flags = ZEND_ACC_IMPLICIT_PUBLIC; +		property_info.name = hash_key->key; +		property_info.ce = ce; +		property_info.offset = -1; +		reflection_property_factory(ce, &property_info, &property TSRMLS_CC);  		add_next_index_zval(retval, &property);  	}  	return 0;  | 
