Mega Code Archive

 
Categories / Php / Class
 

If the variable was defined as private static, it would not be possible to access it directly

<?php  class myclass {      const MYCONST = 123;      private static $value = 567;  }  echo 'myclass::MYCONST = ' . myclass::MYCONST . "\n";  echo 'myclass::$value = ' . myclass::$value . "\n";  ?>