<?php declare (strict_types=1); interface Product { static function getPrice() : float; } class Pen implements Product { static function getPrice() : float { return []; } } var_dump(Pen::getPrice());
<?php class Pen { public $color = "blue"; function write() { echo "<div style='color: {$this->color}'> I am writing </div>"; } } $pen = new Pen(); $pen->write();