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

Octal Integer

Integers can be specified in octal, or base 8, notation. Octal integer syntax starts with 0o, zero-o, and only contains digits from 0 to 7.

Initially, octal integers were formatted by simply starting with a initial 0. This features is still available, yet should be replaced with the less confusing syntax with 0o.

<?php

    // 12
    $octal = 0O14;
    $octal = 014;

?>

Documentation

See Also