Re: Why does `setcookie` send header before throwing `Error` exception?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> it looks
> like calling new foo() from within the class def would
> make it recursively trying to set the cookie.
Actually, the class def begins in one line and ends in the next line (the line `new Foo()` is outside of the class def), did I misunderstand something?; it is similar to this:

	class Foo {}

which is small enough for illustrating what I think is a discrepancy between the two calls I mentioned in previous messages:

>	setcookie('name', 'value', 1, new Foo());

and

>	setcookie('name', 'value', array(
>		'expires' => 1,
>		'path' => new Foo()
>	));

The former does not send any header but the latter does.



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux