<?php
class a{
public $res = 1;
public function abc( int $d){
for ($x=1; $x<$d; $x++)
$this->res = $this->res * $this->abc( $x);
return $this->res;
}
}
$a = new a();
echo $a->abc(10);
Catchable fatal error: Argument 1 passed to a::abc() must be an instance of int, integer given, called in /in/rsXY7 on line 13 and defined in /in/rsXY7 on line 5
Process exited with code 255.