RE: 'Code Snippets' you couldn't live without

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux