summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
authorThomas Gerbet <thomas.gerbet@enalean.com>2019-05-29 16:45:10 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-05-31 18:59:19 +0200
commitbfc10978eff5793a68e7aeb6144b5a2a393833f3 (patch)
tree76ab0b304dea41a38b99985c5fe2c86a15f5481e /ext/simplexml/simplexml.c
parent7f26171445e0b060196bb9b6f1fc506269ced8a4 (diff)
downloadphp-git-bfc10978eff5793a68e7aeb6144b5a2a393833f3.tar.gz
SimpleXMLElement and ResourceBundle implement Countable
Both classes already have a count() method and are considered countable by \is_countable().
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 8077fba77d..fb55b6b195 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -2686,7 +2686,7 @@ PHP_MINIT_FUNCTION(simplexml)
sxe.create_object = sxe_object_new;
sxe_class_entry = zend_register_internal_class(&sxe);
sxe_class_entry->get_iterator = php_sxe_get_iterator;
- zend_class_implements(sxe_class_entry, 1, zend_ce_traversable);
+ zend_class_implements(sxe_class_entry, 2, zend_ce_traversable, zend_ce_countable);
memcpy(&sxe_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
sxe_object_handlers.offset = XtOffsetOf(php_sxe_object, zo);