Re: printf() suggestion
| From: | Monte Ohrt | Date: | Wed, 19 Jul 2000 13:54:55 +0000 |
| Subject: | Re: printf() suggestion | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25099@lists.php.net to get a copy of this message | ||
Maybe it would be a good idea to use uppercase letters for all
non-standard or php-specific printf() functionality? So %H and %U.
Stanislav Malyshev wrote:
>
> MO>> For an example, this:
> MO>> printf("%h,%u",$string1,$string2);
> MO>>
> MO>> would be a shorthand way of doing this:
> MO>> printf("%s,%s",htmlspecialchars($string1),urlencode($string2));
>
> Well, I'd think this, though non-standard, is not a bad addition. Only
> problem the "u" character already has meaning in C printf - it's "unsigned
> decimal". The "U" is free, though.
>
> MO>> *) easier to remember and shorter to type than htmlspecialchars()
> MO>> *) maybe faster, especially if printf() is already being used
>
> Well, I don't think it'd be really faster, but that doesn't matter too
> much.
>
> MO>> cons:
> MO>> *) duplicates existing functionality
>
> THis is not much of a problem too. There are number of aliases in PHP
> already.
>
> --
> Stanislav Malyshev stas@zend.com
> +972-3-6139665
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/