1.2.868. Octal Glossary

List of all the integer values using the octal format : an integer starting with an initial 0.

Putting an initial 0 is often innocuous, but in PHP, 0755 and 755 are not the same. The second is actually 1363 in octal, and will not provide the expected privileges.

<?php

  $a = 1234; // decimal number
  $a = 0123; // octal number (equivalent to 83 decimal)

  // silently valid for PHP 5.x
  $a = 01283; // octal number (equivalent to 10 decimal)

?>

See also Integers.

1.2.868.1. Specs

Short name

Type/Octal

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

integer

Available in

Entreprise Edition, Community Edition, Exakat Cloud