Archive for the ‘php’ Category

I was warned

Tuesday, August 13th, 2013

I was warned about getting back into PHP, but I didn’t listen, and now I have to solve silly problems created by the language trying to be ‘helpful’.


PHP doesn’t cast a string into an integer, unless it thinks it needs to, and vice versa.  If you are just working in PHP, that probably won’t bite you on the butt too often.  But if you need to integrate with another language, like say Java, because you are using PHP and selenium together in a BEHAT environment, you might get an error like,  Can’t convert java.lang.String to int

Which you have to solve by doing

function ITakeAnInt($mynumericstring)   // called with a paramter of  500;


  $mynumericint = $mynumericstring + 0;



Seriously, if you can think of a less silly way to solve the lack of an explicit cast function in PHP, I’m all ears.

New job first days

Wednesday, August 7th, 2013

I’ve been at the new job for 3 days now, and am getting a feel for how things might end up going.

As birdie warned, and I am quickly remembering, PHP is a “a fractal of bad design”, quirky and cumbersome, but Behat really seems awesome in it’s potential.  I can’t help but keep thinking of how it could massively simplify my former co-workers’ job on the web application they are focusing on these days.  It seems plausible that I might actually manage to be writing new tests by the end of the week, at the new job.

The place is noisy, and the company small.  HR is still working their way through figuring out their hiring process, which leaves me uneasy about the potential for gaps in my medical coverage, but I’ve got till the end of the month.  People seem friendly enough, but very busy.

I remain ambivalent, but am at least feeling pretty sure I can accomplish what will be asked of me.