ctype_alpha
Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Check for alphabetic character(s)
ctype_alpha
(
mixed $text
):
bool
composer/composer
}
$splitDriveLetter
= function (
$path
) {
return (
\strlen
(
$path
) >
2
&&
':'
===
$path
[
1
] &&
'/'
===
$path
[
2
] &&
ctype_alpha
(
$path
[
0
]))
? [
substr
(
$path
,
2
),
strtoupper
(
$path
[
0
])]
: [
$path
,
null
];
};
tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/symfony/filesystem/Filesystem.php
composer/composer
public function
isAbsolutePath
(
string $file
)
{
return
''
!==
$file
&& (
strspn
(
$file
,
'/\\'
,
0
,
1
)
|| (
\strlen
(
$file
) >
3
&&
ctype_alpha
(
$file
[
0
])
&&
':'
===
$file
[
1
]
&&
strspn
(
$file
,
'/\\'
,
2
,
1
)
)
tests/Composer/Test/Fixtures/functional/installed-versions2/vendor/symfony/filesystem/Filesystem.php