Skip to content

Instantly share code, notes, and snippets.

@mishterk mishterk/app.php
Last active Oct 22, 2019

Embed
What would you like to do?
An example illustrating PHP's ability to return data from included files. For more info, see https://philkurth.com.au/tips/included-files-can-return-values-which-is-a-great-way-to-manage-app-configurations/
<?php
$config = include 'config.php';
echo $config['some']; // 'config'
<?php
return [
'some' => 'config',
'data' => 'could',
'go' => 'here'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.