diff --git a/reference/var/functions/is-numeric.xml b/reference/var/functions/is-numeric.xml index 380bcb85ac..04068c885d 100644 --- a/reference/var/functions/is-numeric.xml +++ b/reference/var/functions/is-numeric.xml @@ -15,11 +15,12 @@ mixedvar - Finds whether the given variable is numeric. Numeric strings consist of - optional sign, any number of digits, optional decimal part and optional - exponential part. Thus +0123.45e6 is a valid numeric - value. Hexadecimal notation (0xFF) is allowed too but - only without sign, decimal and exponential part. + Finds whether the given variable is numeric. Numeric strings consist of optional + sign, any number of digits, optional decimal part and optional exponential part. + Thus +0123.45e6 is a valid numeric value. Hexadecimal (e.g. + 0xf4c3b00c), Binary (e.g. 0b10100111001), + Octal (e.g. 0777) notation is allowed too but only without + sign, decimal and exponential part. @@ -58,7 +59,10 @@ $tests = array( "42", 1337, - "1e4", + 0x539, + 02471, + 0b10100111001, + 1337e0, "not numeric", array(), 9.1 @@ -79,7 +83,10 @@ foreach ($tests as $element) {