ctype_digit
Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Check for numeric character(s)
ctype_digit
(
mixed $text
):
bool
composer/composer
$args
=
$input
->
getArgument
(
'args'
);
if (
null
!==
$timeout
=
$input
->
getOption
(
'timeout'
)) {
if (!
ctype_digit
(
$timeout
)) {
throw new
\RuntimeException
(
'Timeout value must be numeric and positive if defined, or 0 for forever'
);
}
src/Composer/Command/RunScriptCommand.php
laravel-shift/blueprint
public function
__construct
(
string $data
)
{
if (
ctype_digit
(
$data
)) {
$this
->
status
= (int)
$data
;
} else {
$this
->
content
=
$data
;
src/Models/Statements/RespondStatement.php