Php Is Weird
I'm doing some work in php at the moment and doing some speed testing. Copying a 5mb string to an array is faster (takes ~0.0002 seconds) than adding a reference to the 5mb string to the array (takes ~0.04 seconds). For test after test. Weird. I mean I know php has some hippy variable name lookup table so it's probably not actually copying when it copies it to the array, and I know a php reference isnt a pointer, just a symbol table alias, but I didn't expect that much difference. Or am I looking at this the wrong way and I have a messed up understanding of php references? But if I've got it right, does anyone know where I can find out about PHPs implementation to explain quirky things like this? Other than the PHP source code...
No cd player for my car yet. Most disappointing.
Also disappointing was my trip to Currys last night to get a DVD player. They had one that was £30 when I went in a few days ago, and it said it was region free (if you had a code). Went off to check the details, found the code, looked into it, and found out it was exactly what I wanted. So went back to Currys, but they had sold out. Sucks. Going to try a different Currys now!
Leave a comment
- Add a comment - it's quick, easy and anonymous