I never said that recursion or the ability for a function to call another
function was a feature/bug.  I agree that they are necessary to the
language.  My point is simply that I don't think PHP needs to be "fixed" so
that this user's mistake is somehow valid.

Take this example (in C):
#include <stdio.h>

int a(void);
int b(void);

int main(int argc, char **argv) {

int a(void) {

int b(void) {

If compiled and run this results in a segfault under linux2.2.18 (glibc2).
gcc doesn't warn me that this is invalid.

I am not really sure what we are arguing at this point...


> -----Original Message-----
> From: Zak Greant [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 6:22 PM
> Subject: Re: [PHP-DEV] PHP 4.0 Bug #9136: simple script with infinite
> function calls causes seg fault
> Sean wrote:
> > Dear Zak:
> >
> > Because I don't consider it a problem that needs solving.
> I am probably
> > overlooking some notoriously famous algorithm, but I can't
> think of a
> valid
> > reason for such functionality to exist unless someone is
> purposely trying
> to
> > bring a system to its knees.
> I don't think that this is feature (or a bug FTM) - this is
> just how things
> were implemented - a side effect of needing both recursion
> and allowing
> functions to call other functions.
> --zak

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to