Image by hartboy via Flickr My previous example in part 2 was just “hello world”, so I’m going to try for something more like the real world. You may find this example unusual, but it does work. I took the PageRange class I used in my July 2007 php|architect article and converted it to the [...]
Posts Tagged ‘JavaScript’
Real programming with PHP 5.3 (part 3): Links
Image via Wikipedia After the previous post in this series, additional independent implementations of the idea of JavaScript-style classes have turned up. So I’m going to list them and comment briefly on the differences. I hope this will be helpful to anyone who actually wants to use this in practice and needs to decide on [...]
Real programming with PHP 5.3 (part 2): JavaScript-style classes
In part one of this series, we looked at the ability to use lambda functions or closures to process arrays. In this part, we will see how closures can be used to build classes in a completely new way. After I did my own research, I discovered that someone had beat me to it. As [...]