array_init(return_value);
/* directives */
- MAKE_STD_ZVAL(directives);
- array_init(directives);
- add_assoc_bool(directives, "opcache.enable", ZCG(enabled));
- add_assoc_bool(directives, "opcache.enable_cli", ZCG(accel_directives).enable_cli);
- add_assoc_bool(directives, "opcache.use_cwd", ZCG(accel_directives).use_cwd);
- add_assoc_bool(directives, "opcache.validate_timestamps", ZCG(accel_directives).validate_timestamps);
- add_assoc_bool(directives, "opcache.validate_permission", ZCG(accel_directives).validate_permission);
+ array_init(&directives);
+ add_assoc_bool(&directives, "opcache.enable", ZCG(enabled));
+ add_assoc_bool(&directives, "opcache.enable_cli", ZCG(accel_directives).enable_cli);
+ add_assoc_bool(&directives, "opcache.use_cwd", ZCG(accel_directives).use_cwd);
+ add_assoc_bool(&directives, "opcache.validate_timestamps", ZCG(accel_directives).validate_timestamps);
+ add_assoc_bool(&directives, "opcache.validate_permission", ZCG(accel_directives).validate_permission);
++#ifndef ZEND_WIN32
+ add_assoc_bool(&directives, "opcache.validate_root", ZCG(accel_directives).validate_root);
++#endif
+ add_assoc_bool(&directives, "opcache.inherited_hack", ZCG(accel_directives).inherited_hack);
+ add_assoc_bool(&directives, "opcache.dups_fix", ZCG(accel_directives).ignore_dups);
+ add_assoc_bool(&directives, "opcache.revalidate_path", ZCG(accel_directives).revalidate_path);
+
+ add_assoc_long(&directives, "opcache.log_verbosity_level", ZCG(accel_directives).log_verbosity_level);
+ add_assoc_long(&directives, "opcache.memory_consumption", ZCG(accel_directives).memory_consumption);
+ add_assoc_long(&directives, "opcache.interned_strings_buffer",ZCG(accel_directives).interned_strings_buffer);
+ add_assoc_long(&directives, "opcache.max_accelerated_files", ZCG(accel_directives).max_accelerated_files);
+ add_assoc_double(&directives, "opcache.max_wasted_percentage", ZCG(accel_directives).max_wasted_percentage);
+ add_assoc_long(&directives, "opcache.consistency_checks", ZCG(accel_directives).consistency_checks);
+ add_assoc_long(&directives, "opcache.force_restart_timeout", ZCG(accel_directives).force_restart_timeout);
+ add_assoc_long(&directives, "opcache.revalidate_freq", ZCG(accel_directives).revalidate_freq);
+ add_assoc_string(&directives, "opcache.preferred_memory_model", STRING_NOT_NULL(ZCG(accel_directives).memory_model));
+ add_assoc_string(&directives, "opcache.blacklist_filename", STRING_NOT_NULL(ZCG(accel_directives).user_blacklist_filename));
+ add_assoc_long(&directives, "opcache.max_file_size", ZCG(accel_directives).max_file_size);
+ add_assoc_string(&directives, "opcache.error_log", STRING_NOT_NULL(ZCG(accel_directives).error_log));
+
+ add_assoc_bool(&directives, "opcache.protect_memory", ZCG(accel_directives).protect_memory);
+ add_assoc_bool(&directives, "opcache.save_comments", ZCG(accel_directives).save_comments);
+ add_assoc_bool(&directives, "opcache.fast_shutdown", ZCG(accel_directives).fast_shutdown);
+ add_assoc_bool(&directives, "opcache.enable_file_override", ZCG(accel_directives).file_override_enabled);
+ add_assoc_long(&directives, "opcache.optimization_level", ZCG(accel_directives).optimization_level);
+
#ifndef ZEND_WIN32
- add_assoc_bool(directives, "opcache.validate_root", ZCG(accel_directives).validate_root);
+ add_assoc_string(&directives, "opcache.lockfile_path", STRING_NOT_NULL(ZCG(accel_directives).lockfile_path));
#endif
- add_assoc_bool(directives, "opcache.inherited_hack", ZCG(accel_directives).inherited_hack);
- add_assoc_bool(directives, "opcache.dups_fix", ZCG(accel_directives).ignore_dups);
- add_assoc_bool(directives, "opcache.revalidate_path", ZCG(accel_directives).revalidate_path);
-
- add_assoc_long(directives, "opcache.log_verbosity_level", ZCG(accel_directives).log_verbosity_level);
- add_assoc_long(directives, "opcache.memory_consumption", ZCG(accel_directives).memory_consumption);
-#if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO
- add_assoc_long(directives, "opcache.interned_strings_buffer",ZCG(accel_directives).interned_strings_buffer);
+
+#ifdef HAVE_OPCACHE_FILE_CACHE
+ add_assoc_string(&directives, "opcache.file_cache", ZCG(accel_directives).file_cache ? ZCG(accel_directives).file_cache : "");
+ add_assoc_bool(&directives, "opcache.file_cache_only", ZCG(accel_directives).file_cache_only);
+ add_assoc_bool(&directives, "opcache.file_cache_consistency_checks", ZCG(accel_directives).file_cache_consistency_checks);
#endif
- add_assoc_long(directives, "opcache.max_accelerated_files", ZCG(accel_directives).max_accelerated_files);
- add_assoc_double(directives, "opcache.max_wasted_percentage", ZCG(accel_directives).max_wasted_percentage);
- add_assoc_long(directives, "opcache.consistency_checks", ZCG(accel_directives).consistency_checks);
- add_assoc_long(directives, "opcache.force_restart_timeout", ZCG(accel_directives).force_restart_timeout);
- add_assoc_long(directives, "opcache.revalidate_freq", ZCG(accel_directives).revalidate_freq);
- add_assoc_string(directives, "opcache.preferred_memory_model", STRING_NOT_NULL(ZCG(accel_directives).memory_model), 1);
- add_assoc_string(directives, "opcache.blacklist_filename", STRING_NOT_NULL(ZCG(accel_directives).user_blacklist_filename), 1);
- add_assoc_long(directives, "opcache.max_file_size", ZCG(accel_directives).max_file_size);
- add_assoc_string(directives, "opcache.error_log", STRING_NOT_NULL(ZCG(accel_directives).error_log), 1);
-
- add_assoc_bool(directives, "opcache.protect_memory", ZCG(accel_directives).protect_memory);
- add_assoc_bool(directives, "opcache.save_comments", ZCG(accel_directives).save_comments);
- add_assoc_bool(directives, "opcache.load_comments", ZCG(accel_directives).load_comments);
- add_assoc_bool(directives, "opcache.fast_shutdown", ZCG(accel_directives).fast_shutdown);
- add_assoc_bool(directives, "opcache.enable_file_override", ZCG(accel_directives).file_override_enabled);
- add_assoc_long(directives, "opcache.optimization_level", ZCG(accel_directives).optimization_level);
-
- add_assoc_zval(return_value, "directives", directives);
+
+ add_assoc_zval(return_value, "directives", &directives);
/*version */
- MAKE_STD_ZVAL(version);
- array_init(version);
- add_assoc_string(version, "version", ACCELERATOR_VERSION, 1);
- add_assoc_string(version, "opcache_product_name", ACCELERATOR_PRODUCT_NAME, 1);
- add_assoc_zval(return_value, "version", version);
+ array_init(&version);
+ add_assoc_string(&version, "version", PHP_VERSION);
+ add_assoc_string(&version, "opcache_product_name", ACCELERATOR_PRODUCT_NAME);
+ add_assoc_zval(return_value, "version", &version);
/* blacklist */
- MAKE_STD_ZVAL(blacklist);
- array_init(blacklist);
- zend_accel_blacklist_apply(&accel_blacklist, (apply_func_arg_t) add_blacklist_path, blacklist TSRMLS_CC);
- add_assoc_zval(return_value, "blacklist", blacklist);
+ array_init(&blacklist);
+ zend_accel_blacklist_apply(&accel_blacklist, add_blacklist_path, &blacklist);
+ add_assoc_zval(return_value, "blacklist", &blacklist);
}
/* {{{ proto void accelerator_reset()