I am trying to run a very simple code on a php online compiler but everytime it gives me an error: Here is the link
<?php
function value(integer $h) {
if(!is_int($h)) {
throw new InvalidArgumentException('integer expected');
}
if($h <= 7) {
throw new RangeException('integer should be greater than 7');
}
echo $h;
return $return;
}
$something = value(11111);
echo $something;
Below is the error:
Fatal error: Uncaught TypeError: Argument 1 passed to value() must be an instance of integer, integer given,
Is there anything wrong I am doing here?