interface Test
{
    public function getPrice() : string;
}

class MyPrice implements Test
{

    public function __construct(string $price)
    {
        $this->price =  $price;
    }

    public function getPrice() : string
    {
        return $this->price;
    }
}

echo (new MyPrice('my price'))->getPrice();