I thought, and had been told, that using constants instead of variables in PHP was mostly a matter of speed : at run time, the engine replaces every occurrence of a constant with its hard-coded value, making code presumably faster than using variables that must be evaluated each time they are encountered. Or something like [...] → Read more
Archive for the "PHP" Tag
Create your own complex functions in your wiki.[...] → Read more
PHP5 Benchmarks: for vs while, count vs sizeof, md5 vs sha1 and other speed comparisons like these for those who really need an extra millisecond of optimisation. I like this.[...] → Read more
Basically, a plugin for WordPress creates a PHP function (called a filter or an action) which is triggered when a particular event (called a hook) occurs. When several filters are supposed to be triggered by the same hook, you can define their priority. When you’re writing a plugin and you’re facing unexpected behavior, it may [...] → Read more
In my neverending amateur journey through the wonders of coding, here is something I’ve learnt in PHP today : how to conveniently store a set of flags into one value, with bitmask comparisons made easy thanks to PHP bitwise operators. Sounds greek to you ? Read on, it’s this kind of things that are piece [...] → Read more
While playing a bit with Xdebug (a profiling tool for PHP), I've come across something I didn't know and that I frankly found a bit odd : how to use output buffering (PHP function ob_start()) to speed up some stuff. In a few words, just so you know if this is obvious noob stuff for [...] → Read more
It was quicker than expected, because a kind reader was too impatient for an update so he fixed the script himself :) Thanks to Chris Gibson, my Adsense Earnings RSS Feed is now version 1.1, which is compatible with the recent changes Google made with the query parameters. Thanks a lot Chris ![...] → Read more
I knew about the excellent WordPress Xref (read: cross-ref) maintained by Owen Winkler. This is a cross reference of all functions, variables and constants used and defined in WordPress, which provides worthy help when coding things in or for WordPress. I just found about Functions, another project from the same man, which adds a handier [...] → Read more
My Adsense Earnings to RSS script has stopped functionning a couple of days ago, since Google modified the pages my script parses to generate an RSS feed. Stay tuned : I'll update my script later on within the next few days when I have a moment. Sorry for the inconvenience peeps ![...] → Read more
My Youtube Favorite Videos is my latest plugin. Err widget. Well, actually, plugin and widget. Plugget. And guess what, it displays your latest favorite videos from Youtube, right on your blog. Yes. I know you love it already. Get it.[...] → Read more
