Skip to content

Instantly share code, notes, and snippets.

@acirtautas
Created February 8, 2013 07:09
Show Gist options
  • Save acirtautas/4737217 to your computer and use it in GitHub Desktop.
Save acirtautas/4737217 to your computer and use it in GitHub Desktop.
Example of PHP return on include, nice feature.
<?php
$data = include __DIR__.'/data.php';
var_dump($data);
<?php
$info = "Data string";
return $info;
@acirtautas
Copy link
Author

Good point, I also find this feature very useful for configuration purposes, instead of doing file include and expecting some variable to be defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment