browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Tagged With: php

A week of fire fighting (aka why you should <3 unit tests).

I feel like I’ve spent most of this week debugging some PHP code, and writing unit tests for it. Thankfully I think this firefighting exercise is nearly over. Perhaps the alarm bells should have been going off a bit more in my head when it was implied that the code was being written in a … Continue reading »

Categories: php | Tags: php, work | Leave a comment

Zend_Cache – automatic cache cleaning can be bad, mmkay?

$customer uses Zend_Cache in their codebase – and I noticed that every so often a page request would take ~5 seeconds (for no apparent reason), while normally they take < 1 second … Some rummaging and profiling with xdebug showed that some requests looked like : Note how there are 25,000 or so calls for … Continue reading »

Categories: development, performance, php | Tags: performance, php, xdebug, zend cache | Leave a comment

A caching PHP autoloader

This is probably of little use to normal people, or even many PHP programmers – unless you have more than a handful of directories to rummage through when __autoload()’ing PHP class files. I’ve sometimes found myself rummaging through 10-15, and this has a performance impact. Some random code which uses APC to cache a lookup … Continue reading »

Categories: development, performance, php | Tags: apc, autoload, php, zend framework, zend_cache | 2 Comments

PHP Serialization & igbinary

Recently I’ve been trying to cache more and more stuff – mostly to speed things up. All was well, while I was storing relatively small numbers of data – because (as you’ll see below) my approach was a little flawed. Random background – I use Zend_Cache, in a sort of wrapped up local ‘Cache’ object, … Continue reading »

Categories: development, php | Tags: cache, igbinary, php, phpbarcelona | Leave a comment

Late to the performance party

Everyone else probably already knows this, but $project is/was doing two queries on the MySQL database every time the end user typed in something to search on to get the data between a set range (SELECT x,y….. LIMIT n, OFFSET m or whatever) and another to get the total count of records (SELECT count(field) ….). … Continue reading »

Categories: development, php | Tags: mysql, performance, php, wtf | Leave a comment

Still looking for a PHP contractor….

At work I’m still looking for a short term PHP contractor. Perhaps I’m being unrealistic in my expectations/requirements (rate/location/duration/skills etc), but nevertheless…. As I’ve not found anyone via normal channels (twitter/phpwm user group etc) I thought I’d turn to a random recruitment agency (who I’d spoken to a week or so ago). Yesterday I interviewed … Continue reading »

Categories: php | Tags: contractor, interview, php | 21 Comments

Random PHP project progress

Random php development musing Continue reading »

Categories: development, php | Tags: mvc, pdo, php, propel, simpletest, smarty, tdd, unit testing, zend framework | 2 Comments

PHP array and object addition and string indexing

While reading someone’s code, I came across the following sort of thing: function foo($config = array()) { $this->_config += $config; //… } To which I thought WTF? How does PHP cast an array to a number to perform addition? A few random tests later, it appears PHP joins the two arrays together, only adding indexes … Continue reading »

Categories: Uncategorized | Tags: php | Leave a comment


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser