Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fsdolphin's avatar

Is it common to have just a return statement in a php file - PHP

Hi,

Sorry about the simple question but I'm fairly new to PHP.

Is it common to have just a return statement in a php file? If yes, can someone show me how this is used in other files?

A perfect example is the config files, for instance the database.php.

Once again sorry, I know this is a php question an I should probably already know this but I don't :(.

Thanks

0 likes
1 reply

Please or to participate in this conversation.