Apr 14 2015

Eaten by a gigantic spider

Christoph

Thanks to Hans for this code candy

// Hack to save null value for imageId
// The Zend Framework removes the key of all null values
// in the params array…
// See http://stackoverflow.com/questions/1999797/zend-
// framework-getting-an-empty-param
// SERIOUSLY WHAT THE FUCK IS THIS SHIT?
// I HOPE THE STUPID ZEND FRAMEWORK DEVELOPERS GET EATEN
// BY A GIGANTIC SPIDER!!!

Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (5 Bewertungen, Durchschnitt: 5,00 von 5)
Loading...Loading...

Mai 14 2014

Get all females

Christoph

Thanks to Mike for this code candy

// A function that retrieves all females from the database
// for processing and display:
function getGirls() { //if only it were really that simple
[…]
}

Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (8 Bewertungen, Durchschnitt: 5,00 von 5)
Loading...Loading...

Mai 30 2012

No exceptions

Christoph

Thanks to Tobias for this code candy

return verify_iban($this->iban);
# we could throw exceptions of various types, but why –
# does it really add anything? possibly some slightly
# better user feedback potential. however, this can be
# written by hand by performing individual checks ala
# the code in verify_iban() itself where required, which
# is likely almost never. for the increased complexity
# and maintenance / documentation cost, i say,
# therefore: no. no exceptions.

Source: Direct link to the source code
Software: php-iban
Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (3 Bewertungen, Durchschnitt: 4,67 von 5)
Loading...Loading...

Apr 3 2012

God were we wrong

Christoph

Thanks to Andi for this code candy

/**
this code does more than necessary. this was because we thought we could leave the parameters optional. god were we wrong…
*/

Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (1 Bewertungen, Durchschnitt: 4,00 von 5)
Loading...Loading...

Dez 6 2011

this needs to be explained

Christoph

Thanks to David for this code candy

// this needs to be explained!!
$this->_searchResult[$type] = $this->_searchResult[$type];

Programming language: PHP

1 Star2 Stars3 Stars4 Stars5 Stars (5 Bewertungen, Durchschnitt: 4,60 von 5)
Loading...Loading...