Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Usar finally para ejecutar código de forma diferida:
$handle = fopen($location, 'r+');
if ($handle === false) {
return false;
try {
$firstLine = fgets($handle, 1024);
if ( ! $firstLine) {
return false;
//Do Something with firstline of file
} finally {
return $firstLine;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment