[PHP-DEV] Dear friends

2004-03-17 Thread Herr Witten
It might be a nice feature to add the C++ friend keyword. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Static weirdness..

2004-02-22 Thread Herr Witten
Also, direct usage of classnames should be allowed, and in this case, the usual syntax should be used. ClassName-staticMethod(); On 22 Feb 2004, at 12:30 AM, Josh Fuhs wrote: $stringName::staticMethod(); -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Re: Static weirdness..

2004-02-21 Thread Herr Witten
Isn't this a contradiction? On 21 Feb 2004, at 9:10 PM, Art Hundiak wrote: static methods and static class variables should be consistent. Currently, you cannot access a class variable via an object instance. And for what it's worth, I see no reason why static methods cannot be called from

Re: [PHP-DEV] Re: Static weirdness..

2004-02-20 Thread Herr Witten
(); Herr Witten C++ allows $a-bar() when bar() is a static method (yes, it is called in a static context there too). IMO, there should be no error, warning or notice here. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Method implementation

2004-02-20 Thread Herr Witten
It would be interesting to have variable methods: $object-method = 'method1'; $object-method(); The trouble is all of the extra method mechanisms, so perhaps functions should be defined with access too. Also, one should be able to include $this or have it understood. public function

[PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
It appears that cloning is broken, since a modification to the clone modifies the original. For my __clone method implementation, I allow all of the variables to be set by default except for one. But this problem persists even when I don't modify that one variable. -- PHP Internals - PHP

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
I forgot to mention: I am use b4 On 15 Feb 2004, at 5:45 PM, Herr Witten wrote: It appears that cloning is broken, since a modification to the clone modifies the original. For my __clone method implementation, I allow all of the variables to be set by default except for one. But this problem

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
It appears that only one of the variables, an array, is being shared across these multiple objects, but other array variables are not. Moreover, When I make a clone and then set the clone to null, all clones made thereafter are correct. $clone = clone $object; $clone = null; Also, I can't

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
More specifically, This causes a change in $object: $clone = clone $object; $clone-troublesomeVariable = array(); But this doesn't: $clone = clone $cell; $clone = null; $clone-_subElements = array(); On 15 Feb 2004, at 7:35 PM, Herr Witten wrote: It appears that only one of the variables

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
That should be clone $object for the example. On 15 Feb 2004, at 7:39 PM, Herr Witten wrote: $clone = clone $cell; -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
first as i said do the following to verify: It's a nice example, but it doesn't apply. I don't make a reference. second read the docs and question such things on [EMAIL PROTECTED] I did. This problem seemed to be internal, and it still does. -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
Here, I have reproduced the problem: class A { var $a = array(); public function makeAReference() { $array = $this-getA(); } public function getA() { return $this-a; } } $A = new A; $A-a = array(1); $A-makeAReference(); $clone = clone $A; $clone-a =

Re: [PHP-DEV] clone wars

2004-02-15 Thread Herr Witten
This too: class A { var $a = array(); public function getA() { return $this-a; } } $A = new A; $A-a = array(1); $array = $A-getA(); $clone = clone $A; $clone-a = array(); print_r($A); On 15 Feb 2004, at 9:14 PM, Herr Witten wrote: Here, I have reproduced the problem