News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Brandon Savage's Blog:
Superglobals In Classes Revisited
July 14, 2009 @ 07:51:11

Revisiting an earlier post dealing with superglobals and classes, Brandon Savage looks at an example of why its still a bad idea.

I asserted at the time that superglobals inside of a class violated some basic rules on what a class was supposed to do. Today, I am revisiting that discussion. The placement of superglobals inside a class creates an impossible situation for code reuse. [...] Ehat happens when we want to move this [code] to another site? Unless we leave our form fields named [the same] we'll have to modify the original code.

His alternative - a much better refactoring - lets the verifyCredentials method take in the username and password and has the calling script define where those come from, either from a local or global location.

0 comments voice your opinion now!
refactor revisit class superglobal



Smashing Magazine:
10 Advanced PHP Tips Revisited
March 24, 2009 @ 13:01:37

Smashing Magazine has posted a new article from Chris Shiflett and Sean Coates with their rebuttal to the site's previous 10 Advanced Tips article.

In November 2008 we published the article 10 Advanced PHP Tips To Improve Your Programming. Apparently, according to negative comments to the post, it contained some errors and some statements that are just wrong. [...] To solve the problem, we asked Chris Shiflett and Sean Coates, two PHP gurus, to take a closer look at the article, explain its errors and make it perfectly clear what is actually right and wrong in the theory and practice. This article is a professional response to our article published a couple of months ago.

Here's the more accurate descriptions of those tips - what's good and what's bad - as presented by Chris and Sean:

  • Use an SQL Injection Cheat Sheet
  • Know the Difference Between Comparison Operators
  • Shortcut the else
  • Drop Those Brackets
  • Favor str_replace() Over ereg_replace() and preg_replace()
  • Use Ternary Operators
  • Memcached
  • Use a Framework
  • Use the Suppression Operator Correctly
  • Use isset() Instead of strlen()
1 comment voice your opinion now!
advanced tips revisit helpful article


Christopher Kunz's Blog:
PHPShield revisited
May 22, 2008 @ 08:48:16

Christopher Kunz has gone back and revisited the PHPShield product that he'd looked at previously with data obscured to make potential customer think that it had nothing to do with either SourceGuardian or Inovica.

Checking up on it again, he was happily surprised with some of the results:

I asked him again today via private mail and his response was swift. The whois entries for phpshield.com now point to his person and we can expect additional information on the web site itself soon. I like it when things can be resolved like that and I actually think this is a chance for his product rather than a possible competition issue.

This helps to more clearly define the difference between the PHPShield and SourceGuarian products. You can find out more information about each product from their sites - PHPShield and SourceGuarian. Both are encoding packages to help protect and distribute your code.

0 comments voice your opinion now!
phpshield revisit inovica sourceguardian whois difference


Leendert Brouwer's Blog:
PHP Beginners Tutorial Revisited
May 26, 2006 @ 05:52:49

As referenced in this new blog post today, Leendert Brouwer has posted a rehacshing of a previous introductory tutorial for PHP to his site.

I recently found back a tutorial that I wrote somewhere in the year 2000. It was popular back then, and got a little outdated over time. I changed a bit here and there so it's up-to-date again (mainly superglobals stuff, back then it wasn't uncommon to have register_globals turned On..). Have fun reading it!

It's a good sized tutorial that covers a wide range of topics, including:

  • getting started
  • varaibles/datatypes
  • loops/operators
  • arrays
  • form handling
  • functions
  • some string manipulation

0 comments voice your opinion now!
beginner tutorial introduction revisit beginner tutorial introduction revisit



Community Events





Don't see your event here?
Let us know!


test manifesto package phpunit development series unittest interview introduction custom opinion api language release framework conference podcast application symfony2 community

All content copyright, 2012 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework