Re: [PHP-DEV] catching exception using a variable passed by reference

2012-05-06 Thread Devis Lucato
Hi Laruence, the solution you suggest would work though it makes it all a bit more verbose... I noticed also that the original variable is completely removed from the function scope, which is probably a bug. I'll raise a ticket, thank you ;-) Devis On 6 May 2012 05:04, Laruence wrote: > On S

Re: [PHP-DEV] catching exception using a variable passed by reference

2012-05-06 Thread Nikita Popov
On Sun, May 6, 2012 at 6:04 AM, Laruence wrote: > Hi: >   after a deep look,  I think it's not a bug. > >   the exception in the catch block is only a local var of that block. Not sure this makes sense to me. PHP does not have block scopes; all variables in a function are in the same scope. For ex

Re: [PHP-DEV] catching exception using a variable passed by reference

2012-05-05 Thread Laruence
On Sun, May 6, 2012 at 11:47 AM, Laruence wrote: > On Sun, May 6, 2012 at 8:40 AM, Devis Lucato wrote: >> Hi, >> >> I stumbled upon this code while working with a variable passed by >> reference, I was wondering if someone could provide some feedback before >> raising a ticket, just in case PHP (

Re: [PHP-DEV] catching exception using a variable passed by reference

2012-05-05 Thread Laruence
On Sun, May 6, 2012 at 8:40 AM, Devis Lucato wrote: > Hi, > > I stumbled upon this code while working with a variable passed by > reference, I was wondering if someone could provide some feedback before > raising a ticket, just in case PHP (5.3.6) is doing what it's supposed to > do. > In the code

[PHP-DEV] catching exception using a variable passed by reference

2012-05-05 Thread Devis Lucato
Hi, I stumbled upon this code while working with a variable passed by reference, I was wondering if someone could provide some feedback before raising a ticket, just in case PHP (5.3.6) is doing what it's supposed to do. In the code below I would expect "catch" to change the variable as an assignm