Browse Source

[php] Add extern for `version_compare()` (#9858)

* [php] Add extern for `version_compare()`

* Using overload because the return type depends on the set of arguments

* Fix the overload
Cédric Belin 5 years ago
parent
commit
4a1b14cfcd
1 changed files with 6 additions and 0 deletions
  1. 6 0
      std/php/Global.hx

+ 6 - 0
std/php/Global.hx

@@ -1601,4 +1601,10 @@ extern class Global {
 		@see http://php.net/manual/en/function.http-response-code.php
 	**/
 	static function http_response_code(?response_code:Int):EitherType<Int, Bool>;
+
+	/**
+		@see http://php.net/manual/en/function.version-compare.php
+	**/
+	@:overload(function(version1:String, version2:String, comparisonOperator:String):Bool {})
+	static function version_compare(version1:String, version2:String):Int;
 }