Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-10 Thread Andrew Shearer
-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.

Re: [PHP-DEV] [PATCH] array_get()

2007-09-13 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-12 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-11 Thread Andrew Shearer
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 > >>

Re: [PHP-DEV] [PATCH] array_get()

2007-09-11 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-11 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-10 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-10 Thread Andrew Shearer
.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

[PHP-DEV] [PATCH] array_get()

2007-09-10 Thread Andrew Shearer
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

Re: [PHP-DEV] [PATCH] array_get()

2007-09-10 Thread Andrew Shearer
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

[PHP-DEV] Proposal: array_get, a more palatable alternative to ifsetor

2007-06-17 Thread Andrew Shearer
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