Showing posts with label Lunacy. Show all posts
Showing posts with label Lunacy. Show all posts

Tuesday 4 November 2014

PHP: array_udiff()

G'day:
I'm not too sure how interesting this article is gonna be, but for the last coupla days I've been trying to solve a problem using array_udiff() to filter elements from one array based on their sameyness (I made that word up, sorry) compared to elements in another array. Now I know this perhaps isn't quite the intended purpose of a diffing function - and it turned out to not be a viable solution for this reason - but the investigation turned up some "interesting" behaviour that isn't clearly documented as far as I can tell.

First things first, look at this shambles:

Sunday 5 October 2014

PHP: include paths... it gets worse...

G'day:
This follows on from my article from an hour or so ago "PHP: include paths are relative to the current working directory". The situation there was daft but at least had a precedent in other languages.

But this? This beggar's belief.

PHP: include paths are relative to the current working directory

G'day:
This one had me confused for a day or so last week. It seems the relative paths in include / require calls in PHP are relative to the current working directory, not the file the include statement is actually in. I'm not sure I agree with this.

Wednesday 6 August 2014

PHP's error "handling". Oh dear

G'day:
OK, so I am gonna side track into error-handling in PHP. During the writing of the previous article ("Looking at PHP's OOP from a CFMLer's perspective (part 1/?)") I needed to try to try/catch some stuff, and ended up having to learn a fair bit about how PHP implements error handling. Which is a bit of a horror story.