Инициализация типов / Структуры

<?php

$size = new Size(1010);
$point = new Point(55);
$rect = new Rect($size, $point); 

print_r($rect);

//In PHP there are no struct type
class Size {
    public $width;
    public $height;

    public function __construct($width, $height) {
        $this->width = $width;
        $this->height = $height;
    }
}

class Point {
    public $left;
    public $top;

    public function __construct($left, $top) {
        $this->left = $left;
        $this->top = $top;
    }
}

class Rect {
    public $size;
    public $point;

    public function __construct($size, $point) {
        $this->size = $size;
        $this->point = $point;
    }
}