Hi,
I've attached a patch for getimagesize()
that returns named keys for
image width, height, type and attributes values. The equivalent numeric
keys 0, 1,2 and 3 are still returned but could perhaps be deprecated in
the future?
The patch also contains updated tests to reflect the change.
Regards,
Paul Dixon
Hi,
I've attached a patch ...
Rename as .txt to get through the mailing list s/w.
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
Thanks Richard,
Renamed and attached.
-----Original Message-----
From: Richard Quadling [mailto:rquadling@gmail.com]
Sent: 08 July 2011 17:13
To: DIXON P.
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] [PATCH] getimagesize - return named keys for width, height, type and attributes
Hi,
I've attached a patch ...
Rename as .txt to get through the mailing list s/w.
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
Thanks Richard,
Renamed and attached.
-----Original Message-----
From: Richard Quadling [mailto:rquadling@gmail.com]
Sent: 08 July 2011 17:13
To: DIXON P.
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] [PATCH] getimagesize - return named keys for width, height, type and attributesHi,
I've attached a patch ...
Rename as .txt to get through the mailing list s/w.
For consistency, should bits and mime become 4 and 5?
This would work in the same way as using named capturing in a regex,
where you get both the position index and the name in the result array
and I think various db_fetch_as_array type functions also.
--
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea
Thanks Richard,
Renamed and attached.
-----Original Message-----
From: Richard Quadling [mailto:rquadling@gmail.com]
Sent: 08 July 2011 17:13
To: DIXON P.
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] [PATCH] getimagesize - return named keys for width, height, type and attributesHi,
I've attached a patch ...
Rename as .txt to get through the mailing list s/w.
For consistency, should bits and mime become 4 and 5?This would work in the same way as using named capturing in a regex,
where you get both the position index and the name in the result array
and I think various db_fetch_as_array type functions also.
It would be trivial to add 4, 5 and 6 for mime, channels and bits
respectively, and I can do that if people think that's best. However
personally long term, I would aim to remove the position index entries
completely.
Paul
personally long term, I would aim to remove the position index entries
completely.
Which would make it unusable with list().
Mike
2011/7/12 Michael Wallner mike@php.net:
personally long term, I would aim to remove the position index entries
completely.Which would make it unusable with list().
+1 this will be huge BC break for this function. Please, don't remove
position indexes.
--
--
Regards,
Shein Alexey
I hadn’t thought of list().
I've update the patch (attached) so that each value has both an indexed and associative entry in the returned array, so that it will still work with list().
Paul
-----Original Message-----
From: Alexey Shein [mailto:confik@gmail.com]
Sent: 12 July 2011 10:44
To: Michael Wallner
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] [PATCH] getimagesize - return named keys for width, height, type and attributes
2011/7/12 Michael Wallner mike@php.net:
personally long term, I would aim to remove the position index
entries completely.Which would make it unusable with list().
+1 this will be huge BC break for this function. Please, don't remove
position indexes.
--
To unsubscribe,
visit: http://www.php.net/unsub.php
--
Regards,
Shein Alexey
This one is quite positive, I'm all +1 on this as a user land developer.