You appear to be a bot. Output may be restricted
Description
Emulate PHP native ctype_digit() function for when the ctype extension would be disabled *sigh*.
Only emulates the behaviour for when the input is a string, does not handle integer input as ascii value.
Usage
$bool = ctype_digit( $string );
Parameters
- $string
- ( string ) required – String input to validate.
Returns
bool
Source
File name: wordpress-seo/inc/wpseo-functions.php
Lines:
1 to 8 of 8
function ctype_digit( $string ) { $return = false; if ( ( is_string( $string ) && $string !== '' ) && preg_match( '`^\d+$`', $string ) === 1 ) { $return = true; } return $return; }