x = $x; $this->y = $y; } } class Line { public $a; public $b; public function __construct(Point $a, Point $b) { $this->a = $a; $this->b = $b; } } $line = null; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $x1 = intval($_POST['x1']); $y1 = intval($_POST['y1']); $x2 = intval($_POST['x2']); $y2 = intval($_POST['y2']); $pointA = new Point($x1, $y1); $pointB = new Point($x2, $y2); $line = new Line($pointA, $pointB); } ?>
x1: y1: x2: y2:

Αποτέλεσμα