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 f3b4675 commit a38636eCopy full SHA for a38636e
resources/lib/utils.php
@@ -89,7 +89,7 @@ function getHyperlink($text, ...$url_components)
89
*/
90
function str2int(string $x, ...$args): int
91
{
92
- if (preg_match("/^[0-9]+$/", $x)) {
+ if (ctype_digit($x)) {
93
return intval($x, ...$args);
94
} else {
95
throw new ValueError("not digits: $x");
0 commit comments