How to send objects to function

Asked

Viewed 37 times

0

I’m starting with PHP POO and I’m trying to pass a class to a function.

How can I do that?

$usuario = new Usuario();
registraUsuario(Usuario $usuario,$conexao);

1 answer

1


You do not need to use type to pass a parameter

registraUsuario($usuario, $conexao);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.