Hi!
I've created a voting page for the features in 5.4 TODO list for which
we need to find consensus. Please go there:
https://wiki.php.net/todo/php54/vote
and vote!
See also links to relevant RFCs on the TODO page:
https://wiki.php.net/todo/php54
If something is unclear or you notice a mist
On 8 July 2011 17:21, DIXON P. wrote:
> Thanks Richard,
>
> Renamed and attached.
>
> -Original Message-
> From: Richard Quadling [mailto:rquadl...@gmail.com]
> Sent: 08 July 2011 17:13
> To: DIXON P.
> Cc: internals@lists.php.net
> Subject: Re: [PHP-DEV] [PATCH] getimagesize - return name
Thanks Richard,
Renamed and attached.
-Original Message-
From: Richard Quadling [mailto:rquadl...@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
On 8 Jul
On Fri, Jul 8, 2011 at 6:09 PM, Richard Quadling wrote:
> On 8 July 2011 16:31, Mike Robinson wrote:
>> On July-08-11 10:01 AM Rafael Dohms wrote:
>>
>> [snip]
>>
>>> first time using preg_match is a nightmare.
>>
>> IMHO, preg_match is poetry in motion.
>>
>> Going through a million lines of cod
On 8 July 2011 17:10, DIXON P. wrote:
> 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
--
PHP Internals - PHP Runtime Development Mailin
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.
Regar
On 8 July 2011 16:31, Mike Robinson wrote:
> On July-08-11 10:01 AM Rafael Dohms wrote:
>
> [snip]
>
>> first time using preg_match is a nightmare.
>
> IMHO, preg_match is poetry in motion.
>
> Going through a million lines of code replacing ereg[i] with preg_match
> because it was deprecated in 5
On July-08-11 10:01 AM Rafael Dohms wrote:
[snip]
> first time using preg_match is a nightmare.
IMHO, preg_match is poetry in motion.
Going through a million lines of code replacing ereg[i] with preg_match
because it was deprecated in 5.3 - *that* is a nightmare.
Best Regards
Mike Robinson
Oh by all means, kill the warning. The behavior is sound though (the fix
for the issue reported in #53727 where a missing parent *ce would affect
the is_a_impl()'s ability to correctly determine it's subtype.
The question is, should we keep the warning in 5.4? I'd say no, I think
false should
2011/7/8 Rafael Dohms :
> Still, this is preg_match it only returns one match, why should i get
> a array and have to use ugly things like $matches[0] afterwards?
> It just makes for very ugly syntax and extra code, a simple function
> would make this cleaner and more intuitive, first time using
>
Still, this is preg_match it only returns one match, why should i get
a array and have to use ugly things like $matches[0] afterwards?
It just makes for very ugly syntax and extra code, a simple function
would make this cleaner and more intuitive, first time using
preg_match is a nightmare.
--
Ra
Hi Rafael :-),
On 08/07/11 15:18, Rafael Dohms wrote:
On Fri, Jul 8, 2011 at 9:20 AM, Nikita Popov wrote:
The most common use for preg_match is validation:
if (!preg_match('~...~', $string)) { /* do something */ }
Here $matches is not required, only the 0/1 return value of preg_match is of
i
No, you don't need to initialize $matches. It's passed by reference and thus
doesn't need to be initialized.
And as I already said: It is good practice to ensure that preg_match
actually matched something:
if (preg_match(REGEX, $string, $matches)) {
// in here $matches is guaranteed to be defi
On Fri, Jul 8, 2011 at 9:20 AM, Nikita Popov wrote:
> The most common use for preg_match is validation:
>
> if (!preg_match('~...~', $string)) { /* do something */ }
>
> Here $matches is not required, only the 0/1 return value of preg_match is of
> interest.
>
> Furthermore, even if you need $matc
Hi Folks:
On Thu, Jul 07, 2011 at 02:20:50PM -0700, Stas Malyshev wrote:
>
> In fact, I'm not sure why would we need such warning at all. Unknown
> class - return false, who cares?
+1
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intens
The most common use for preg_match is validation:
if (!preg_match('~...~', $string)) { /* do something */ }
Here $matches is not required, only the 0/1 return value of preg_match is of
interest.
Furthermore, even if you need $matches, you should always combine it with an
if:
if (!preg_match('~.
I was wondering if anyone ever thought of either fixing or writing a
new function that would make preg_match actually work in a way that
made sense?
right now i need to pass in a optional parameter that will receive the
match, in this case one or no match, why should this not be the
function's ret
17 matches
Mail list logo