Passing variables to anonymous PHP functions

1 · Josh Sherman · March 10, 2014, midnight
The other day I ran into a situation (first time, it seems) where I needed to access a variable inside of an anonymous function inside of preg_replace_callback(). My first thought, even though it went against my better judgement was to simply define the variables as global inside of the function.......