Sending objects to function

0

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);
    
asked by anonymous 26.11.2017 / 01:39

1 answer

1

You do not need to use the type to pass a parameter

registraUsuario($usuario, $conexao);
    
26.11.2017 / 02:09