Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]

2008-08-28 Thread Matt Wilmas
Hi Johannes, - Original Message - From: "Johannes Schlüter" Sent: Thursday, July 31, 2008 > Matt, > > On Thu, 2008-07-31 at 20:06 +0200, Johannes Schlüter wrote: > > On Thu, 2008-07-31 at 11:48 -0500, Matt Wilmas wrote: > > > Ugh, I hate that reference/recursion stuff! I have a hard time

Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]

2008-07-31 Thread Johannes Schlüter
Matt, On Thu, 2008-07-31 at 20:06 +0200, Johannes Schlüter wrote: > On Thu, 2008-07-31 at 11:48 -0500, Matt Wilmas wrote: > > Ugh, I hate that reference/recursion stuff! I have a hard time following > > what's happening, and am not sure how some of those checks, etc. even work > > in php_array_me

Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]

2008-07-31 Thread Johannes Schlüter
Hi, On Thu, 2008-07-31 at 11:48 -0500, Matt Wilmas wrote: > Ugh, I hate that reference/recursion stuff! I have a hard time following > what's happening, and am not sure how some of those checks, etc. even work > in php_array_merge() (which I was working from). :-/ I tried changing a few > parts,

Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]

2008-07-31 Thread Matt Wilmas
Hi Johannes, - Original Message - From: "Johannes Schlüter" Sent: Thursday, July 31, 2008 > Matt, > > On Tue, 2008-07-22 at 10:52 -0500, Matt Wilmas wrote: > > Adding these two array functions has been on the TODO for a while, > > The patch can quite easily be tricked into an endless recu

Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]

2008-07-31 Thread Johannes Schlüter
Matt, On Tue, 2008-07-22 at 10:52 -0500, Matt Wilmas wrote: > Adding these two array functions has been on the TODO for a while, The patch can quite easily be tricked into an endless recursion of php_array_replace_recursive() calls which will segfault: $ php -r '$a = array(); $a[] = &$a; $b = a