03/02_pokusA.php


  1  <html>
  2  <body>
  3  <?php
  4  
  5  class CA
  6  {
  7    private $x="?";
  8    public function CA($x)
  9    {
 10      $this->x=$x;
 11      echo "CA::CA($x)<br />\r\n";
 12    }
 13  }
 14  
 15  $A = new CA("A");
 16  $B = new CA("B");
 17  
 18  $A->p="Kuk";
 19  $B->p="Juj";
 20  
 21  echo "\$A->p=$A->p<br />\r\n";
 22  echo "\$B->p=$B->p<br />\r\n";
 23  
 24  ?>
 25  </body>
 26  </html>

« Spä¯