Browse Source

[php] Add externs for OPcache functions (#9913)

* [php] Add externs for OPcache functions

* [php] Fix the OPcache externs
Cédric Belin 4 years ago
parent
commit
80618b1da6
1 changed files with 30 additions and 0 deletions
  1. 30 0
      std/php/Global.hx

+ 30 - 0
std/php/Global.hx

@@ -1727,4 +1727,34 @@ extern class Global {
 		@see http://php.net/manual/en/function.parse-ini-string.php
 	**/
 	static function parse_ini_string(ini:String, process_sections:Bool = false, ?scanner_mode:Int): EitherType<NativeAssocArray<Dynamic>, Bool>;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-compile-file.php
+	**/
+	static function opcache_compile_file(file:String):Bool;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-get-configuration.php
+	**/
+	static function opcache_get_configuration():NativeAssocArray<Dynamic>;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-get-status.php
+	**/
+	static function opcache_get_status(get_scripts:Bool = true):EitherType<NativeAssocArray<Dynamic>, Bool>;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-invalidate.php
+	**/
+	static function opcache_invalidate(script:String, force:Bool = false):Bool;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-is-script-cached.php
+	**/
+	static function opcache_is_script_cached(file:String):Bool;
+
+	/**
+		@see http://php.net/manual/en/function.opcache-reset.php
+	**/
+	static function opcache_reset():Bool;
 }