What is your favorite php statement?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Oren wrote:Don't be shy... what's the name of this project? :P
I'm 99% positive it has been mentioned on this board before, and by that I mean that someone is involved with it. I'm not going to put my foot in it again :P

I've also just seen one of the contributors for the module I am reviewing has an @php.net address.. :?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Jenk wrote:Aye, that's just about exactly what it is. Someone's framework that has just had more and more stuff glued on, but the people doing the glueing aren't too hot at development.
CodeIgniter?
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Jenk wrote:I've also just seen one of the contributors for the module I am reviewing has an @php.net address.. :?
OMG :? :? :?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Its gotta be osCommerce.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

No, it's a framework based project, although osCommerce is a bit of a shocker too. Not CodeIgniter, never looked at their code.
User avatar
seodevhead
Forum Regular
Posts: 705
Joined: Sat Oct 08, 2005 8:18 pm
Location: Windermere, FL

Post by seodevhead »

Code: Select all

sleep();
I think you know..
Begby
Forum Regular
Posts: 575
Joined: Wed Dec 13, 2006 10:28 am

Post by Begby »

Here are some of my favorite snippets from the app I work on that came from some of the other developers.


This is in the middle of a object and was put there as a joke I believe as calling it causes a fatal error (spray() doesn't exist)

Code: Select all

function check()
{
  if ($poop)
  {
     // stink
     $this->spray('freshener') ;
  }
}
This is the top of every page

Code: Select all

<SCRIPT language="JavaScript">
	function popup( url ){
	  cuteLittleWindow = window.open(url, "littleWindow", "location=0,scrollbars=1,width=450,height=300"); 
	}
</SCRIPT>
Derek quit about a year ago. I discovered this little gem a month ago and am very tempted to comment it out just to see what happens

Code: Select all

// DO NOT REMOVE THIS STATEMENT
// ALL HELL WILL BREAK LOOSE
// Derek 02/07/05
if( $reset )
{
	$this->get( $prodID ) ;
}
Here is another very informative comment

Code: Select all

/****************************************
* READ THIS!!!!                                           
*                                                          
* NEVER MODIFY THE INVENTORY OF A PRODUCT DIRECTLY          
* Call the inventoryChange() or inventoryUpdate() methods instead to track the changes
* 
* If you don't I swear on my mother's grave I am going to cut you with my knife, beat
* your wife with my tire iron, sell your children into slavery, then drive over to your house and kick
* your ugly useless dog
*                                                           
*******************************/
class tblProduct extends LawnGnome {
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Dude, I didn't know lawnGnome's could be extended?!?! :?::!:
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I didn't either!! My lawn gnomes could use a few inches. :lol:
User avatar
ptrpan
Forum Commoner
Posts: 81
Joined: Tue Apr 03, 2007 5:09 am
Location: Cape Town, South Africa

Post by ptrpan »

That guy is EEEEEEEEEEEEEMMMMMMMMMMMMMMMOOOOOOOOOOOO!!!!!!!!! :crazy:
User avatar
GeertDD
Forum Contributor
Posts: 274
Joined: Sun Oct 22, 2006 1:47 am
Location: Belgium

Post by GeertDD »

It is not exactly a 'function', but I like type casting as a way of cleaning up data.

Code: Select all

$clean_id = (int) $_GET['dangerous_id'];
Post Reply