Jump to content

Any Obessive PHP Programmers? Share what you've done here!


Recommended Posts

Note that the thread title part "obsessive" is a joke. Because who can beat me when it comes to making code just for the sake of it? :P

I kid, I bet more exists out there somewhere. So feel free to share stuff here. I got a lot of stuff so I'll come back and give a proper list of things I've done in my 5+ years of programming in this language primarily.

Link to comment
Share on other sites

I came to PHP after learning other languages, and although I'm better for knowing it, I'm worse for actually using it in new projects for anything beyond the simplest of scripting.  The failures of the language itself that have tripped me up most are its backwards ternary operator stacking and the need to use triple-equals instead of double-equals to check if standard library functions succeeded or failed. (An example of that latter bit, <?php $haystack="apple"; $needle="a"; $pos=strpos($haystack, $needle); if ($pos == FALSE) { echo "There is no $needle in $haystack."; } else { $pos=$pos+1; echo "$needle is letter $pos in $haystack."; } ?> will print "There is no a in apple.", while <?php $haystack="apple"; $needle="a"; $pos=strpos($haystack, $needle); if ($pos === FALSE) { echo "There is no $needle in $haystack."; } else { $pos=$pos+1; echo "$needle is letter $pos in $haystack."; } ?> will print "a is letter 1 in apple.")  These days, I use C, Bash, and Ruby while I learn Perl and Python, and I mainly deal with PHP the same way people deal with COBOL: legacy project maintenance only.

The last PHP code I wrote with lasting effects on the Web is a program to regenerate the static HTML page at start.thornton2.com, whose content I badly need to update.

Link to comment
Share on other sites

My current PHP project is based heavily off of a friend's code, that I've taken and made extensible, and then extended it to meet another friend's need for their website:


Extensions include a comment system, an admin page, and a comic auto-update script.

I'm probably going to take some of the general concepts from this system and make a simple static CMS system off it later.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...