Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is integer
is_int(mixed $value): bool
                switch (true) {

                    case 
null === $v:

                    case 
\is_bool($v):

                    case 
\is_int($v):

                    case 
\is_float($v):

                        continue 
2;

                    case 
\is_string($v):
                    $style 'index';


                case 
Cursor::HASH_ASSOC:

                    if (
\is_int($key)) {

                        
$this->line .= $this->style($style$key).' => ';

                    } else {

                        
$this->line .= $bin.'"'.$this->style($style$key).'" => ';
    public function testDumpPeriod($start$interval$end$options$expected)

    {

        
$p = new \DatePeriod(new \DateTime($start), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end), $options);



        
$xDump = <<<EODUMP

DatePeriod {
    public function testCastPeriod($start$interval$end$options$xPeriod$xDates)

    {

        
$p = new \DatePeriod(new \DateTime($start, new \DateTimeZone('UTC')), new \DateInterval($interval), \is_int($end) ? $end : new \DateTime($end, new \DateTimeZone('UTC')), $options);

        
$stub = new Stub();



        
$cast DateCaster::castPeriod($p, [], $stubfalse0);