RE: [PHP] 'Code Snippets' you couldn't live without

From: Date: Wed, 03 Nov 2004 19:39:42 +0000
Subject: RE: [PHP] 'Code Snippets' you couldn't live without
Groups: php.general 
Request: Send a blank email to php-general+get-201079@lists.php.net to get a copy of this message
[snip]Klaus Reimer wrote: > Murray @ PlanetThoughtful wrote: >> function asl($val){ >> function mfr(&$rset){ > > This may be ok for private projects but otherwise I don't think it's a > good idea to create "shorthand" functions. Other developers (and > especially new developers beginning to work on the project) are > getting confused. They must first learn what this functions are > doing. The names of these functions are not really helpful in > understanding what's going on.[/snip] I'm with Klaus on this one. I see the purpose of creating functions that eliminate repetitive behaviour by using native PHP functions and doing a little something extra with the results to suit your needs, but as for just using asl($val) instead of addslashes($val), well why not just extend the PHP source to make asl() an actual alias to addslashes()? My $0.02 (CDN). Pablo

« previous php.general (#201079) next »