<?php function get_value(): mixed { return null; // You can return any type here } var_dump(get_value());
info at phpclasses dot org