A Basic Php 5 Class

<?php
     class myPHP5Class {
          public $my_variable;
          public function my_method($param) {
               echo "called my_method($param)!\n";
               echo "my variable is: ";
               echo "{$this->my_variable}\n";
          }
     }
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.