mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-10 03:01:01 +00:00
18 lines
266 B
PHP
18 lines
266 B
PHP
<?php
|
|
class Point
|
|
{
|
|
private int $x;
|
|
private int $y;
|
|
|
|
public function __construct(int $x = 0, int $y = 0)
|
|
{
|
|
$this->x = $x;
|
|
$this->y = $y;
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return "({$this->x}, {$this->y})";
|
|
}
|
|
}
|