Archive for November, 2008
Leona Lewis, Run on X-factor
by Adrian on Nov.16, 2008, under Music
Leona Lewis sings run on x-factor
This has to be one of the most incredible performances I have ever seen
Names of baby p murderers
by Adrian on Nov.13, 2008, under baby p
Hopefully a search engine brought you here
The Beasts names and details are below, and 100% accurate
Tracey Connolly, 25, and Stephen Barker, 31, from north London, are accused of murder and allowing or causing the death of a child under 16.
Mr Barker’s brother Jason, 35, is charged with allowing or causing the death of a child under 16.
They were remanded into custody by Highgate magistrates until a hearing at the Old Bailey on 23 November
And there more than likely being held in Pentonville HMP
Go get the bastards!
and sack the social workers
http://www.thesun.co.uk/sol/homepage/news/article1925012.ece
If you go to http://zoopslife.com/
It shows images of the people that did those inhumane and horrific things to him.
A word of warning though, it also explains what happened, and is extremely distressing to read.
0 in $_GET is empty in PHP
by Adrian on Nov.12, 2008, under Programming, Work
Whilst at work,
I was writing a cart for an e-commerce site I am building.
The Cart consisted of a multi-dimensioned array, part associative, part indexed, anyway of note here is that,
A. It was an array.
B. The contents where indexed numerically
C. Arrays as you know begin at zero.
When removing an element from the cart, the elements indexed value, is passed via GET to be handled via the object, for removal.
It seemed to work fine, until I attempted to remove the first element, after a little debugging, I noticed the “0″ value was being interpreted by PHP as empty?
WTF?
A quick mock up code later
1 2 3 | <?php if (!empty($_GET['get'])) echo "I RECIEVED A GET WITH VALUE: ".$_GET['get']; ?> |
and a check in the url
nameOfFile.php?get=1 displayed “I RECIEVED A GET WITH VALUE: 1″
nameOfFile.php?get=0 displayed “”
It seems that according to PHP the value zero is interpreted as empty because it is being handled as a string when used within GET.
But…………….
A string, as the name suggests is just a string of characters, strung together, it is an array of characters, or bytes, the fact that it held zero, would be irrelevant would`nt it not?
I can understand if it was attempting to cast the datatype to an integer, but again, zero is still zero.
The only scenerio I can see this being valid if it where NULL!
PHP uses loose datatypes or lucid?
General discussion RSS Feed