Simperium – cross-platform data layer
Category: Programming
A big part of my work has to do with code. I’ve worked as system administrator – installing, patching, and configuring someone else’s code. I’ve worked as independent programmer, writing code on my own. I also programmed as part of the team. And on top of that, I worked as Team Leader and Project Manager, where I had to interact a lot with programmers. Programming world on its own is as huge as the universe. There is always something to learn. When I find something worthy or something that I understand enough to write about, I share it in this category.
PHP 5.4.0 : Built-in web server
Google Chrome extensions : Advanced REST client
PHP: self:: vs. static::
I am seeing more and more PHP code with static:: key used for method calls instead of self::. Today I’ve finally found some time to examine the novelty. The page that is useful for more details is PHP’s late static binding. This functionality is available since PHP 5.3.0 so you might as well start using it.
I am a bit protective of my code, so self:: feels like a safer, more natural option. But after thinking about it for a bit, and discussing with my colleagues, I came to the conclusion that I should be using static:: instead of self::. It provides cleaner inheritance and minimizes code copy-pasting.
