We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c0f372 commit 211d647Copy full SHA for 211d647
resources/lib/utils.php
@@ -84,12 +84,13 @@ function getHyperlink($text, ...$url_components)
84
}
85
86
/**
87
+ * extra args (ex: base) are passed along to intval()
88
* @throws ValueError
89
*/
-function str2int(string $x): int
90
+function str2int(string $x, ...$args): int
91
{
92
if (is_numeric($x)) {
- return intval($x);
93
+ return intval($x, ...$args);
94
} else {
95
throw new ValueError("not numeric: $x");
96
0 commit comments