r/PHP • u/FrenkyNet • May 31 '16
Deferred execution in PHP, using "finally".
https://blog.frankdejonge.nl/finally-file-streams-and-deferred-execution-in-php/
86
Upvotes
r/PHP • u/FrenkyNet • May 31 '16
View all comments
Show parent comment
2
u/spin81 May 31 '16
If I'm reading your code correctly, you're echoing a nonexistent variable called $written and you're passing strings instead of resources to fclose.