-1. Keep the query functions and return FALSE. No need to unnecessarily
break b/c for scripts that were just trying to do the right thing by coping
with both possibilities. It's just one more roadblock to PHP 6 adoption.
On Sep 12, 2007, at 2:25 PM, Lukas Kahwe Smith wrote:
Andrew Shearer wrote:
Meanwhile, array_get() provides the most-needed functionality
while avoiding
the issues that prevented ifsetor's acceptance.
Aside from lack of BC hacks what is the issue? I remember some
fussing about the
On 9/12/07, Marcus Boerger <[EMAIL PROTECTED]> wrote:
>
> Hello Robert,
>
> yeah ifsetor if much better than the @-?: combination. But for 5.3 that
> would be all we could do. For 6 and in the long run we might do a real
> ifsetor. If ever we could come to a consensus... and no i don't really
> l
gt;>
> >> >>
> >> >>> IMPLEMENTATION
> >> >>
> >> >>> A core C implementation of array_get() benchmarked between two and
> >> >>> three times as fast as the implementation in PHP. I'll attach the
> >>
tions of both. See the LIMITATIONS section for an example.
> >>
> >>> ifsetor: as discussed above, ifsetor wasn't a regular function. It
> >>> required special language syntax support because it attempted to test
> >>> whether a direct paramet
on_exists('array_get')) {
function array_get($arr, $key, $default = false) {
if (array_key_exists($key, $arr)) {
return $arr[$key];
}
else {
return $default;
}
}
}
(This version turned in the fastest times out of several variants.
Passin
On Sep 10, 2007, at 10:31 PM, Antony Dovgal wrote:
On 11.09.2007 02:12, Andrew Shearer wrote:
Here's a patch against HEAD that implements the array_get function
previously suggested on this list. I also attached a test suite,
which should go in ext/standard/tests/array/array_get.phpt. Fee
.phpt
On Sep 10, 2007, at 6:27 PM, Andrew Shearer wrote:
Let me try that again with the files attached. I'll leave out the
full original proposal this time.
On Sep 10, 2007, at 6:12 PM, Andrew Shearer wrote:
Here's a patch against HEAD that implements the array_get function
previ
array_get($arr, $key, $default = false) {
if (array_key_exists($key, $arr)) {
return $arr[$key];
}
else {
return $default;
}
}
}
(This version turned in the fastest times out of several variants.
Passing $arr by reference or attempting to return
Let me try that again with the files attached. I'll leave out the
full original proposal this time.
On Sep 10, 2007, at 6:12 PM, Andrew Shearer wrote:
Here's a patch against HEAD that implements the array_get function
previously suggested on this list. I also attached a
rray_key_exists($key, $arr)) {
return $arr[$key];
}
else {
return $default;
}
}
}
(This version turned in the fastest times out of several variants.
Passing $arr by reference or attempting to return the result by
reference had a huge nega
11 matches
Mail list logo