Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-31 Thread Antony Dovgal
Committed. On 30.08.2007 16:55, Antony Dovgal wrote: > Hello. > > I'd like to commit these two patches (for HEAD and 5_2 appropriately). > The patches disallow declaring any magic methods as accepting arguments by > ref (which makes no sense anyway). > > Example: > class test { > function

Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-31 Thread Marcus Boerger
gt; To: php-dev >> Subject: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods >> >> >> Hello. >> >> I'd like to commit these two patches (for HEAD and 5_2 >> appropriately). The patches disallow declaring any magic >> methods as

Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Stanislav Malyshev
The method call doesn't work in this case, it fails with fatal error, just try the example I posted. Ah, missed that part. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Antony Dovgal
On 30.08.2007 23:27, Stanislav Malyshev wrote: >> Expected result of this code is: >> Fatal error: Method test::__set() cannot take arguments by reference in %s >> on line %d > > I'd make it a warning. As far as I can see, declaring __set with > references doesn't do anything bad, just reference

Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Stanislav Malyshev
Expected result of this code is: Fatal error: Method test::__set() cannot take arguments by reference in %s on line %d I'd make it a warning. As far as I can see, declaring __set with references doesn't do anything bad, just reference thing doesn't work (correct me here if I'm wrong). So why

RE: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Dmitry Stogov
; Subject: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods > > > Hello. > > I'd like to commit these two patches (for HEAD and 5_2 > appropriately). The patches disallow declaring any magic > methods as accepting arguments by ref (which makes no s

Re: [PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Richard Quadling
On 30/08/2007, Antony Dovgal <[EMAIL PROTECTED]> wrote: > Hello. > > I'd like to commit these two patches (for HEAD and 5_2 appropriately). > The patches disallow declaring any magic methods as accepting arguments by > ref (which makes no sense anyway). Why not. Sure, on __set()/__get()/__unset()

[PHP-DEV] [PATCH] disallow arguments by ref in magic methods

2007-08-30 Thread Antony Dovgal
Hello. I'd like to commit these two patches (for HEAD and 5_2 appropriately). The patches disallow declaring any magic methods as accepting arguments by ref (which makes no sense anyway). Example: $name = 1; ?> Expected result of this code is: Fatal error: Method test::__set() cannot take argum