Re: md5sum() patch
| From: | James Moore | Date: | Fri, 16 Nov 2001 11:00:02 +0000 |
| Subject: | Re: md5sum() patch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-70633@lists.php.net to get a copy of this message | ||
shouldnt it be file_md5 if we are sticking with out namespace convention.
- James
----- Original Message -----
From: "Chris Newbill" <cnewbill@elementalrain.com>
To: "PHP DEV" <php-dev@lists.php.net>
Sent: Friday, November 16, 2001 5:57 AM
Subject: RE: [PHP-DEV] md5sum() patch
> Nahh I think md5_file() isn't very good.
>
> However, overloading md5() doesn't really seem like a good idea either.
>
> md5sum() is pretty appropriate, anybody who is going to use this function
is
> probably going to be familiar with the md5sum program.
>
> Plus md5sum() is fewer keystrokes. ;)
>
> -Chris
>
> -----Original Message-----
> From: Markus Fischer [mailto:mfischer@guru.josefine.at]
> Sent: Thursday, November 15, 2001 1:10 PM
> To: Hartmut Holzgraefe
> Cc: Lenar Lõhmus; php-dev@lists.php.net
> Subject: Re: [PHP-DEV] md5sum() patch
>
>
> On Thu, Nov 15, 2001 at 09:37:22PM +0100, Hartmut Holzgraefe wrote :
> > Lenar Lõhmus wrote:
> >
> > >Alessandro Astarita wrote:
> > >>Il 17:25, giovedì 15 novembre 2001, derick@php.net ha scritto:
> > >>>Then this will do the same:
> > >>>$sum =
md5sum filename;
> > >>>
> > >>Do I have to depends on the external executable? ...in my opinion is
not
> > >>the right way.
> > >
> > >+1 to the function
> >
> > hm, what about just overloading the current md5 function?
> >
> > if given a string -> current behavior
> >
> > if given a file handle resource -> read file and return sum
>
> -1 on that (+1 on md5_file() )
>
> You want your code look like
>
> $f = fopen('filename');
> $md5sum = md5($f);
> fclose($f);
>
> than
>
> $m45sum = md5_file($f);
>
> ?
>
> No seriously I hope ;)
>
> - Markus
>
> --
> 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
>
>
> --
> 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