$fn1 = fn($x) => $x + $y;
$fn2 = function ($x) use ($y) {
return $x + $y;
};
$date = new DateTimeImmutable ();
$date->format('Y-m-d');
DateTimeImmutable::createFromMutable(new \DateTime('now'));
str_contains (\strtoupper(substr('abcdef', -2), 'f'));
function testMe(string|int $name): int
{
if (empty($name)) {
return 0;
} elseif ($name === 1) {
return (int) $name;
}
switch($name) {
case '2':
return 2;
default:
throw new \Exception('error');
}
}
$fun = mb_strlen();
$fun();
setAlarm(
label: 'foo',
time:time() + array(5)[0] + Foo::HOUR,
);