Here’s an article I came accross with some interesting PHP optimization tricks. I found the last one, about faster array access, particularly interesting/surprising.
Search
Obama HQ Blog
RSS- Video: Barack At The League Of United Latin American Citizens National Conference
- The Open Convention: Your Voices
- Share your thoughts on Barack's address before LULAC
- Watch Barack LIVE at the League of United Latin American Citizens
- Organizing Fellows: Laura in St. Louis, Missouri
- Message from Barack: Listening to America
- New Obama Campaign Ad Sets Record Straight on Energy
- Morning News
- Watch Barack LIVE in Atlanta Today
- Open Thread
Latest Comments
RSS- lazloman on the post How to convert an sqlite 2 database into an sqlite 3 database
- florist on the post My new blog: Obama Letdown Watch
- Lawlor on the post My Name in Tengwar Quenya Elvish
- Simon on the post My Name in Tengwar Quenya Elvish
- Derly Chapa on the post My Name in Tengwar Quenya Elvish
- Simon Jansen on the post My Name in Tengwar Quenya Elvish
- Brian Almeida on the post My Name in Tengwar Quenya Elvish
- Jay on the post My Name in Tengwar Quenya Elvish
- matthew on the post My Name in Tengwar Quenya Elvish
- Myrna on the post My new blog: Obama Letdown Watch
Links
a few other blogs i read
Blogs of Friends
Friend's projects
Me
My Projects
People linking to me
RSS- Anyone want the domain name ‘missingwiki.org’
- Comment on wordpress.com != good domain hosting by apotheon
- TODAY'S NEWS HEADLINES for INDEPENDENT VOTERS
- Si Hillary Clinton es un PC, ¿qué es Barack Obama?
- Fixing broken links in WordPress after changing the permalink ...
- SSH connection multiplexing!
- yeswecanhas.com in the news
- NYC February 13th - 19th
- Ciberpolítica para la presidencia según Obama
- GOOD free disposable email addresses
My favorite trick is to use perl instead - seriously, I’m currently looking for a really cheap place to host the spamgourmet bbs, because I’m afraid to install PHP on the new server. A little tricky, because the really cheap ones (like godaddy) seem to want to hardcode the host name to start with www (instead of bbs, like I’d like)
ha! you josh, are a perl brat.
are you afraid to install it on the new server because of performance, or security?
Careful with the in_array / isset swap. I just tried it out on some of my code and found that isset did not correctly work like how in_array does. I couldn’t find the problem in the PHP docs. Just make sure to test it 1st.
Even if it worked, however, I’m torn about writing speed-tuned code. PHP should really take care of this for me. Same thing with most of the speed tricks.
APART from all that, however, if I was really hell-bent on speed, I wouldn’t be using these nice OO designs and abstraction layers. If I need speed, it’s less cost-effective to tune my apps (potentially lowering readability and perhaps breaking later if the assumptions about the language internals are no longer valid) than just hosting on a faster setup.
I’m hungry.
Good article, I learnt a couple of things. The isset / in_array trick works very well, however you have to keep in mind one uses keys and the other values.