Use 0755 as base-8 number
<p>Here is my code:</p>

<pre><code>function myChmod($path, $permission, $log)
{
    //this is to overcome umask limitations that mkdir adheres to
    $result = chmod($path, octdec($permission));
    if(!$result) {
        $log-&gt;log("Error failed to chmod '$path' to '$permission'. Exiting.");
        throw new Exception("Error failed to chmod '$path' to '$permission'. Exiting.");
    }
    return $result;
}

$trml2pdfPath = $c-&gt;install_path.'assets/trml2pdf/trml2pdf/trml2pdf.py';
myChmod($trml2pdfPath, 0755, $log);
</code></pre>

<p>How do I prevent PHP from changing this base-8 number <code>0755</code> to base-10 number <code>493</code>? I wanna use the chmod function in PHP, but it just keeps changing it to <code>493</code>.</p>
