This weeks PHP code mistake

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
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

Very hard to pinpoint error

Code: Select all

while($this = mysql_fetch_assoc($that));
{
   //do this
}
Sometimes, i stick a semicolon at the end of the while(). Bet you missed it huh? ;)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

the funny thing is that the information on our personal machines isn't that sensitive. The information in the mainframes is pretty critical, but the stuff on our machines is just not that intense. Oh well, I guess it was bound to happen. Either through policy or legislation, but it was going to happen.
My company has the same policy (though it's 5 minutes, not 10). Nobody ever complained.
Personally, I have a nice habit of pressing Win+L when I get up from my chair.
Last edited by Weirdan on Fri Aug 18, 2006 3:41 am, edited 1 time in total.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Since some colleagues were happy to play pranks by changing background/wallpaper images to .. questionable content, I too always press windows+L as I get up :)
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Not really a code mistake (well, depending how you look at it), but I like the memory error's PHP reports:

Code: Select all

PHP Fatal error:  Allowed memory size of 8388608 bytes exhausted (tried to allocate 52 bytes) in /var/www/*** on line 220
That confuses alot of people.

Also I like the look on someone's face when they get this...

Code: Select all

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/jamiel/test.php on line 18
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Daedalus- wrote:Today, I was writing a class. I finished it and then was wondering why it wasn't being contructed.

I went to look at the __construct function; it was named __autoload

LOL
Thanks for the good laugh Daedalus :D
Post Reply