PHP 8.5.0 Alpha 1 available for testing

Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

contato at andersonfraga dot net
16 years ago
Number is octal?

Simple and easy:

<?php

function is_octal($x) {
return
decoct(octdec($x)) == $x;
}

echo
is_octal(077); // true
echo is_octal(195); // false

?>

Thanks
[]'s

<< Back to user notes page

To Top