lcname = zend_string_tolower(name);
fbc = zend_hash_find_ptr(CG(function_table), lcname);
- if (!fbc || (fbc->type == ZEND_INTERNAL_FUNCTION &&
- (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ if (!fbc
+ || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
) {
zend_string_release(lcname);
return FAILURE;
lcname = zend_string_tolower(Z_STR_P(name));
fbc = zend_hash_find_ptr(CG(function_table), lcname);
- if (!fbc || (fbc->type == ZEND_INTERNAL_FUNCTION &&
- (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ if (!fbc
+ || (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
+ || (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
) {
zend_string_release(lcname);
zend_compile_dynamic_call(result, &name_node, args_ast);
* to change the default compiler behavior */
/* generate extended debug information */
-#define ZEND_COMPILE_EXTENDED_INFO (1<<0)
+#define ZEND_COMPILE_EXTENDED_INFO (1<<0)
/* call op_array handler of extendions */
#define ZEND_COMPILE_HANDLE_OP_ARRAY (1<<1)
/* generate ZEND_INIT_FCALL_BY_NAME for internal functions instead of ZEND_INIT_FCALL */
-#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<2)
+#define ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS (1<<2)
/* don't perform early binding for classes inherited form internal ones;
* in namespaces assume that internal class that doesn't exist at compile-time
* may apper in run-time */
-#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<3)
+#define ZEND_COMPILE_IGNORE_INTERNAL_CLASSES (1<<3)
/* generate ZEND_DECLARE_INHERITED_CLASS_DELAYED opcode to delay early binding */
-#define ZEND_COMPILE_DELAYED_BINDING (1<<4)
+#define ZEND_COMPILE_DELAYED_BINDING (1<<4)
/* disable constant substitution at compile-time */
-#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<5)
+#define ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION (1<<5)
/* disable usage of builtin instruction for strlen() */
-#define ZEND_COMPILE_NO_BUILTIN_STRLEN (1<<6)
+#define ZEND_COMPILE_NO_BUILTIN_STRLEN (1<<6)
/* disable substitution of persistent constants at compile-time */
#define ZEND_COMPILE_NO_PERSISTENT_CONSTANT_SUBSTITUTION (1<<7)
+/* generate ZEND_INIT_FCALL_BY_NAME for userland functions instead of ZEND_INIT_FCALL */
+#define ZEND_COMPILE_IGNORE_USER_FUNCTIONS (1<<8)
+
/* The default value for CG(compiler_options) */
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY