Monday, 25 May 2015

Some CFML code that doesn't work

G'day:
I was sitting at Lord's yesterday watching England v NZ (and, um, we'll have no comments about that, thank-you very much), and a sudden thought popped into my head "Adam Presley might've been onto something there... if I leverage that....I wonder if I could get that code down to one statement?"

And that of course will mean nothing to anyone.

Lucee seems to mess up boolean expressions (kinda)

G'day:
Another bloody stumbling block writing this code (see CFML / Lucee: beware of "optional" semi-colons for the first one). This time Lucee's not getting the result of a OR expression right. Seriously. Well: I guess not as right as I'd like it to.

CFML / Lucee: beware of "optional" semi-colons

G'day:
Not what I had in mind writing up today, but as often is the way... the easiest way to find bugs in CFML is it try to use it.

Wednesday, 20 May 2015

Random PHP (7) bits: improvements to generators

G'day:
I was gonna have a look at output buffering in PHP today, but my attention has been hijacked by PHP 7. So instead I'm gonna have a look at some enhancements they've made to generators in 7. I'm actually not at work today, so there's a chance I'll be able to write both articles anyhow. We'll see.

Tuesday, 19 May 2015

Random PHP bits: __debugInfo()

G'day:
This is not a very insightful article, but I just happened to stumble across this functionality, and found it moderately interesting. This is another one of these "PHP n00b" articles, so if you're a seasoned PHP person, you'll not be reading anything here you don't already know.

Monday, 18 May 2015

Lucee CFML: import and application-set mappings (kinda redux)

G'day:
This is a like a sequel to "Railo bug? Or ColdFusion bug...". That article details how ColdFusion will kind of allow import to use mappings set in Application.cfc, provided an include uses said mapping first. On RailoLucee they stick closer to the docs (that's the ColdFusion docs, not the Lucee docs):

Attribute: taglib
Optionality: required
Description: Tag library URI. The path must be relative to the web root (and start with /), the current page location, or a directory specified in the Administrator ColdFusion mappings page.
My emphasis.

The Lucee docs make no claim about this one way or the other, but that's how Lucee behaves. In short, on Lucee one cannot use Application.cfc mappings with an import statement like that.

Sunday, 17 May 2015

Getting PHP 5.x & 7-dev running on Windows/Apache

G'day:
Yesterday evening I discovered there are runnable versions of PHP 7-dev for Windows. I'd looked around for them before, but didn't spot them. Maybe they're new. I'm really struggling to get myself as far into the PHP loop as I am in the CFML one. Admittedly mostly due to lack of really trying.

Anyhow, I downloaded it and installed it (read: unzipped it), and indeed it seemed to a) work; b) do stuff PHP 5 can't do and PHP 7 is supposed to be able to do. So I figured "yeah, OK, so I do have PHP7 running". I'll write that lot up later on, once I have a decent play with it.

All my experiments last night - which were brief as I was at the bar @ LHR awaiting a flight - were running stuff via the CLI. This is fine with PHP but not how I'm used to doing stuff. Given I'm from a CFML background I'm used to running my test code in a browser, not a prompt, so I decided to get PHP7 running on Apache today. I've just managed to get it co-habitating with PHP 5. Win.

Here's what I had to do...