ctype_digit()
function ctype_digit(string $text): bool
Checks if all characters in the string are digits.
Parameters:
$text(string)
Returns: bool
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/ctype_digit.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how ctype_digit is implemented in the compiler, see the internals page.