Skip to content

Commit aeebed2

Browse files
committed
Use fast class cache
1 parent 19775af commit aeebed2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ext/spl/php_spl.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,13 @@ static zend_class_entry *spl_perform_autoload(zend_string *class_name, zend_stri
442442
break;
443443
}
444444

445-
zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lc_name);
446-
if (ce) {
447-
return ce;
445+
if (ZSTR_HAS_CE_CACHE(class_name) && ZSTR_GET_CE_CACHE(class_name)) {
446+
return (zend_class_entry*)ZSTR_GET_CE_CACHE(class_name);
447+
} else {
448+
zend_class_entry *ce = zend_hash_find_ptr(EG(class_table), lc_name);
449+
if (ce) {
450+
return ce;
451+
}
448452
}
449453

450454
zend_hash_move_forward_ex(SPL_G(autoload_functions), &pos);

0 commit comments

Comments
 (0)