Thread: php question
View Single Post
Old 05-08-2008, 01:27 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
Quote:
Originally Posted by salsbury View Post
i've heard that before. i expect to be retired in 30 years. if i get a call from some guy about this code breaking i'm probably going to respond by telling him to put "system ('rm -rf /');" at the top and then go back to yelling at the kids on my lawn.
I've audited your code and find it to be what I consider to be scary; how do we know what 5 years ago is, really?!?

What we can do in the event of the year being at, or after 2038 is to set a boolean to use new functions, as such:

Code:
if (date("Y") > "2037") {
   $carryOver = "1";
}

if ($carryOver == "1") {
   private function foo()...
} else {
   private function foo()...
}
This way we can make all functions exchangable based upon the time when the function is executed! Talk about extendability!
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote