mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
- Add some comment
This commit is contained in:
parent
2ce7bcd742
commit
b0c2af58f7
@ -326,6 +326,7 @@ PHP_FUNCTION(count)
|
||||
break;
|
||||
case IS_OBJECT: {
|
||||
#if HAVE_SPL
|
||||
/* it the object implements Countable we call its count() method */
|
||||
zval *retval;
|
||||
|
||||
if (instanceof_function(Z_OBJCE_P(array), spl_ce_Countable TSRMLS_CC)) {
|
||||
@ -335,6 +336,7 @@ PHP_FUNCTION(count)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/* if not we return the number of properties (not taking visibility into account) */
|
||||
if (Z_OBJ_HT(*array)->count_elements) {
|
||||
RETVAL_LONG(1);
|
||||
if (SUCCESS == Z_OBJ_HT(*array)->count_elements(array, &Z_LVAL_P(return_value) TSRMLS_CC)) {
|
||||
|
Loading…
Reference in New Issue
Block a user