Hey,

No hard feelings intended.  Please do not take my post to be anything more 
than some mailing list bantering.  :)

I agree - htmlspecialchars() is about as clear as you can get - and I'll 
continue to use it UNTIL (IF EVER) a shorter function or method becomes a 
built in PHP function that is CLEARLY documented in the PHP manual.

If that ever happens, then I'll gladly switch, and there should be no 
readability problems for anyone familiar with PHP.

-Jason Garber
IonZoft.com

At 12:03 AM 1/19/2002 +0100, you wrote:
>Hi,
>
> > Apparently, you either I grossly mistyped what I wanted to say, or you
> > misread it, or you never coded much in php.
>
>The first one.
>
> >> > I was wondering if it would be feasible to create an alias for this
> >> > function, say hsc() or something short.
> >>
> >> > [..]
> >>
> >> > It is no big deal, but for a function that is used ALL THE TIME, it 
> would
> >> > be nice.
> >>
> >>why do something in C, when it can be done in PHP so nicely:
> >>
> >>function hsc(&$var) {
> >>   $var = htmlspecialchars($var);
> >>}
>
> > Maybe you ought to coding guidelines on zend.com which EXPLICITLY state
> > that the above practice is BAD.
>
>You're quite funny. Could you please read my sentence below?
>
>"..Actually doing hsc() in PHP is compareable silly.."
>
>I never said this would be a good solution - but you demanded it.
>
> >>Alias are terrible. The decrease readability of your code. Actually
> >>doing hsc() in PHP is compareable silly.
>
>      ^^^^
>      re-read this please.
>
> > What I am trying to find out here is if it would be feasible to implement
> > the alias in C, so there is not performance loss, and so it makes every
> > ones lives just a little bit easier.
>
>It is not about performance. It is about _readability_. Aliases are
>good to maintain backwards compatibility, but they shouldn't be used
>to introduce more commands which do the same thing.
>
>Kind Regards,
>   Daniel Lorch
>--
>@echo "Hello, World";


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to