Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

is_double(), is_long(), is_integer() And doubleval() Are Deprecated

is_double(), is_long(), is_integer() and doubleval() have always been pure aliases for is_float(), is_int(), is_int() and floatval() respectively. Until PHP 8.6, calling any of these aliases produced no diagnostic. In PHP 8.6, calling any of them emits a deprecation notice pointing to the canonical function name, even though the alias keeps working exactly as before.

PHP code

<?php

var_dump(is_double(1.5));
var_dump(is_long(1));
var_dump(is_integer(1));
var_dump(doubleval("1.5"));

?>

Before

bool(true)
bool(true)
bool(true)
float(1.5)

After

PHP Deprecated:  Function is_double() is deprecated since 8.6, use is_float() instead

Deprecated: Function is_double() is deprecated since 8.6, use is_float() instead
bool(true)
PHP Deprecated:  Function is_long() is deprecated since 8.6, use is_int() instead

Deprecated: Function is_long() is deprecated since 8.6, use is_int() instead
bool(true)
PHP Deprecated:  Function is_integer() is deprecated since 8.6, use is_int() instead

Deprecated: Function is_integer() is deprecated since 8.6, use is_int() instead
bool(true)
PHP Deprecated:  Function doubleval() is deprecated since 8.6, use floatval() instead

Deprecated: Function doubleval() is deprecated since 8.6, use floatval() instead
float(1.5)

PHP version change

This behavior was deprecated in 8.6.

This behavior changed in .

See Also

Error Messages

Extension

© 2023-2026, Damien Seguy - Exakat