<?php
class ClassName
{
public function foo(stdClass $bar = null)
{
}
}
$instance = new ClassName();
$instance->foo(new stdClass());
$instance->foo(null);
Deprecated: ClassName::foo(): Implicitly marking parameter $bar as nullable is deprecated, the explicit nullable type must be used instead in /in/MaOKk on line 5