php 8 oluşturucu
class Point {
public function __construct(
public float $x = 0.0,
public float $y = 0.0,
public float $z = 0.0,
) {}
}
php oluşturucu
__construct ([ mixed $args = "" [, $... ]] ) : void
PHP 8 oluşturucu tanıtımı
public function __construct(
public string $myProperty,
public string $myOtherProperty,
) {}