-
Recent Posts
Recent Comments
Archives
- June 2018
- March 2018
- October 2017
- August 2015
- May 2015
- February 2015
- January 2015
- December 2014
- August 2014
- July 2014
- May 2014
- March 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- January 2013
- August 2012
- December 2011
- November 2011
- March 2011
- August 2010
- February 2010
- January 2010
- June 2009
- April 2009
- March 2009
- December 2008
- November 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
Categories
Meta
Category Archives: PHP
Push Notifications on iOS
As with anything new on iOS, getting push notifications working has been a pain. Thankfully, there’s a brilliant write-up of the process here: Apple Push Notification Services in iOS 6 Tutorial: Part 1/2. Plus the PhoneGap/Cordova plug-in to make it … Continue reading
Posted in PHP, Programming
Leave a comment
DomDocument::loadXml not throwing exceptions in PHP
For some reason, Zend have decided not to make PHP throw an exception when you try and load invalid XML into a DomDocument object. This includes XML with invalid characters e.g. &. This means wrapping a try/catch around anything does … Continue reading
Posted in PHP, Programming
Leave a comment
PHPÂ aaaaarrrrrggggghhhhhh
Things I hate about PHP No. 512 (notwithstanding the fact that in comparison to many other things I like PHP): Inconsistency in parameter ordering Say I want to find a small thing in a big thing, like a piece of … Continue reading
Posted in PHP, Programming
Leave a comment
PHP 4 foreach as references
PHP 4 doesn’t seem to create references for objects in foreach loops. e.g. the following will not change the original objects: foreach($placeholder as $contentBlock) { $contentBlock->setPosition(1); } The value of the position property in the original object will remain unaffected. … Continue reading
Posted in PHP, Programming
2 Comments
PHP 4 annoyances ( = rant)
After working with PHP 5 for quite some time now, I’ve had to go back to PHP 4 to develop a CMS for a client’s site where we don’t have much over the hosting environment. Going back to the old … Continue reading
Posted in PHP, Programming
1 Comment
PHP 5 Static class variable inheritence
PHP 5 doesn’t seem to attempt to implement any kind of inheritance for properties within static classes. This can be mean having to duplicate code within static subclasses. As an example, we would like to have a parent class (this … Continue reading
Posted in PHP, Programming
Leave a comment
Using importNode and appendChild with PHP 5 DOM
importNode is one of the DOM functions in PHP 5 that I struggled with for a while. What I wanted to do was to take an XML node from one document and insert it into another, and somehow that wasn’t … Continue reading
Posted in PHP, Programming
5 Comments
Using removeChild with the PHP 5 DOM
The documentation for PHP 5’s DOM functions isn’t at its most helpful yet, so I thought an example of how to use ‘removeChild’ wouldn’t go amiss. Assuming first that you have some DOMDocument XML in a variable called $xml, that … Continue reading
Posted in PHP, Programming
Leave a comment
PHP loop benchmarking
This benchmark of different ways of looping over a hash array is very interesting. Some things aren’t too surprising, such as counting the elements in an array before looping over them is faster than not counting them, could be expected, … Continue reading
Posted in PHP, Programming
Leave a comment
PHP 5 and the magic __toString() method
Working with PHP 5 I thought the ‘magic’ method __toString would be a really great way of substituting objects for simple data types. That seemed the whole point of good object oriented design, so I could change the way a … Continue reading
Posted in PHP, Programming
Leave a comment