Global variables not working in PHP CLI
<p>Running into a problem where my code works fine when its run with apache but when I run it through CLI it can't see this variable $jobID. Any thoughts?</p>

<p>PS. please dont school me on not using global variables.</p>

<p>EDIT:</p>

<p>This doesnt work:</p>

<pre><code>$jobID = mysql_insert_id();

function someFunction() {
     global $jobID;
     echo $jobID;
}
</code></pre>

<p>This does:</p>

<pre><code>$jobID = mysql_insert_id();

function someFunction($jobID) {
     echo $jobID;
}
</code></pre>

<p><strong>FIXED</strong>
Using Register Globals:This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
<a href="http://php.net/manual/en/security.globals.php" rel="nofollow">http://php.net/manual/en/security.globals.php</a></p>
