title: override an array from different Method
body: <p>I would like to add an curl Option in the method listDir to be able to list the files
  the connection method works just fine but when am trying to append the <code>cOptions</code> array and add        <code>$this-&gt;cOptions[CURLOPT_CUSTOMREQUEST]=&quot;PROPFIND&quot;;</code></p>
  <p>it doesn work!!!! and help clue what to do?</p>
  <p>thanks in Advance</p>
  <pre><code>&lt;?php
  
  class test{
     
     public static $cOptions;
     
     public function connect(){
        
        $ch = curl_init();
  
        $this-&gt;cOptions=array(
           CURLOPT_URL =&gt;&quot;111&quot;,
           CURLOPT_RETURNTRANSFER=&gt;1
        );
        
        
        $response = curl_exec($ch);
        curl_close($ch);
        return $response;      
        
     }
     
     public function listDir(){
        
         $this-&gt;cOptions[CURLOPT_CUSTOMREQUEST]=&quot;PROPFIND&quot;;
         $connection=$this-&gt;connect();
        
        return $connection; ///// should list files
     }
  }
  $myclass=new test();
   $myclass-&gt;connect();
  $myclass-&gt;listDir();
  
  
  </code></pre>