2 Votes Vote

17 PHP Practices That Should Be Banished Forever

Posted by worbit 360 days ago php
http://www.samuelfolkes.com — A great list of some PHP practices that should be banished forever; the practices included in the list are overused and their usage will bring security breaches, performance issues, unreadable spaghetti style code:
Using Register Globals, Relying on Magic Quotes, Not Sanitizing and Validating User Input, Mixing HTML, PHP, SQL, JS, CSS, Etc, Etc; Using Short/ASP Style Tags; Not Documenting Code; Using User Input as an Argument in eval(); Recursive Inclusion; Unnecessarily Wrapping Native Functions in Classes; Using die() to ‘Handle’ Errors; Using Regex Functions for Basic String Manipulation; Not Closing Database Connections; Error Suppression Using The ‘@’ Symbol; Inappropriate Display of Errors; Unquoted Array Keys; Using Uninitialized Variables; Placing Functions in Loop Declaration

Discuss Bury
Tags: php howto bad practice list All


Who Voted for this Story