I'm starting with PHP POO and I'm trying to pass a class to a function.
How can I do this?
$usuario = new Usuario();
registraUsuario(Usuario $usuario,$conexao);
I'm starting with PHP POO and I'm trying to pass a class to a function.
How can I do this?
$usuario = new Usuario();
registraUsuario(Usuario $usuario,$conexao);
You do not need to use the type to pass a parameter
registraUsuario($usuario, $conexao);