This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function that demonstrates how to use closures to generate blocks of independent logic without extracting things into separate methods/functions. | |
* | |
* This avoids fragmentation of the code and allows to keep the logic in one place if the pieces are not reused/reusable, but still allows for save scoping. | |
* | |
* As explained by Brian Will: | |
* https://youtu.be/QM1iUe6IofM?t=2255 | |
*/ |