Please note that, $argv and $argc need to be declared global, while trying to access within a class method. 
<?php
class A
{
    public static function b()
    {
var_dump($argv);
var_dump(isset($argv));
    }
}
A::b();
?>
will output NULL bool(false)  with a notice of "Undefined variable ..."
whereas global $argv fixes that.