« first day (5174 days earlier)   

12:10
@Sjon what is happening with 3v4l? It seems to be down for me.
 
1 hour later…
13:34
Static variables inside functions are very interesting
I only just realised you don't need to ??= assign to them for them to work that way. Actually, I found it frustrating that you can't declare and assign to them that way on the same line using ??=, until I realised plain assign = works the same way in this context
But what about generator functions? i.e. combining static $foo and yield. Each time the function is executed, it will create a new generator. So does it also allocate new memory for the "static" variable, or is it still shared?
13:59
You could just test it. But the storage should be shared I believe.
14:51
It's not that easy to test
But sure, I could
You could just document it :^)
But the documentation glosses over such a case
Since generator functions are effectively factory methods, I don't think it should just be assumed to work the same as all other methods

« first day (5174 days earlier)