2718.us blog » objects http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 php5 is fun http://2718.us/blog/2008/04/08/php5-is-fun/ http://2718.us/blog/2008/04/08/php5-is-fun/#comments Tue, 08 Apr 2008 23:15:21 +0000 2718.us http://2718.us/blog/?p=9 A few weeks ago, I upgraded my primary server to some version of php5 (from php4).  It’s been some time since I moved from php3 to php4 (even though I still have some files with a .php3 extension), but I don’t remember it being a huge change.  I upgraded because there was some small feature I wanted…  actually two small features I wanted that weren’t in php4.  One of them was all the curl_multi_ stuff (which parallelized the retrieval of the various LJ clone stats.txt files, making the cache update for that site a much much shorter process).  I don’t, offhand, remember what the other one was, I just know I ran into it again in the past few days and it was some other function that didn’t exist until php5.

Now, what I didn’t know when I did the upgrade was that php5 defaults to having register_globals off.  This is a very good thing.  I’ve been working hard for the past year to make sure any code I was working on didn’t rely on register_globals.  What I didn’t do however, was make sure that any code that was already in use on my server didn’t need register_globals.  This led to a weekend of digging through server error logs to find the scripts that needed to be fixed (if they could easily be fixed) or patch specific chunks of code wholesale by forcing register_globals on in .htaccess.

Lately, though, I’ve been playing with objects/classes.  I like the changes in the object/class stuff in php5 (even though I’m very oldskool and OOP still feels very strange to me, I keep trying to make OOP stuff work).  Komodo Edit, however, doesn’t seem to like it when I use php5 things like protected and private functions and variables.  I suspect this is because my macs have php4 somewhere and Komodo Edit is using the actual php executable to run syntax checks.  I haven’t yet found an easy way to deal with this, since I don’t want to just install php5 over the php4 that’s part of the base OS X install.

]]>
http://2718.us/blog/2008/04/08/php5-is-fun/feed/ 0