var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
var $x;
var $y;
- function point($x, $y) {
+ function __construct($x, $y) {
$this->x = $x;
$this->y = $y;
}
protected $protected_var1 = "string_1";
protected $protected_var2;
- function object_class ( ) {
+ function __construct() {
$this->value = 50;
$this->public_var2 = 11;
$this->private_var2 = 21;
echo "func() is called \n";
}
- function contains_object_class () {
+ function __construct() {
$this->class_object1 = new object_class();
$this->class_object2 = new object_class();
$this->class_object3 = $this->class_object1;
protected $protected_var1 = "string_1";
protected $protected_var2;
- function object_class ( ) {
+ function __construct() {
$this->value = 50;
$this->public_var2 = 11;
$this->private_var2 = 21;
echo "func() is called \n";
}
- function contains_object_class () {
+ function __construct() {
$this->class_object1 = new object_class();
$this->class_object2 = new object_class();
$this->class_object3 = $this->class_object1;