check php version

This commit is contained in:
Jean-Baptiste Nahan
2025-10-06 17:54:19 +02:00
committed by GitHub
parent 44a0c089ca
commit e16624fd1c

5
lua.c
View File

@@ -867,8 +867,11 @@ PHP_MINIT_FUNCTION(lua) {
php_lua_closure_register();
INIT_CLASS_ENTRY(ce, "LuaException", NULL);
#if PHP_VERSION_ID >= 80500
lua_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception);
#else
lua_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
#endif
return SUCCESS;
}