Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php access class variable

Example:

class Person{
	
    private:
    	string name="john doe";
        string skinColor = "white';
}

$obj = new Person();
$obj->name;          // john doe
$obj->skinColor;     // white
 
PREVIOUS NEXT
Tagged: #php #access #class #variable
ADD COMMENT
Topic
Name
3+1 =