OOP | PHP | Instance | local Variable | global Variable

<?php

      $test = "im testing";



    class box{

public $name = "myboxasasas";  //local variable
public  $code = " 112";  //lcv

function work(){

echo "this is my function";


}

}

          $bigbox = new box();
 
     
 
        echo $bigbox->code;

       echo $test;



?>

Comments

Popular Posts