- var_dump: documentation ( source)
- max: documentation ( source)
- min: documentation ( source)
<?php
class Point { public function __construct(public int $x, public int $y) {} }
$p1 = new Point(10, 2);
$p2 = new Point(0, 0);
$p3 = new Point(5, 5);
$result = min($p3, max($p2, $p1));
var_dump($result);