[PHP-DEV] Patch for adding elements to ArrayAccess

2004-01-03 Thread Simeon Koptelov
Hello internals, Could anyone who can commit to CVS review this patch and commit it if it's OK? The patch was made for php5-200401021030 snapshot, the file zend_object_handlers.c. It fixes the bug that using $a[] = 'Something' where $a is instance of ArrayAccess will invoke offsetSet() with empt

[PHP-DEV] Segfault on ArrayAccess use

2003-12-19 Thread Simeon Koptelov
Hello internals, The following code produces segfault using snapshot php5-200312191230. array[ $offset ] ); } public function offsetGet( $offset ) { return $this->array[ $offset ]; } public function offsetSet( $offset, $data ) { $this->array[ $offset

[PHP-DEV] Not calling handlers on property modification

2003-12-10 Thread Simeon Koptelov
Hello internals, I'm writing extension that substitutes object's read_property and write_property handlers with it's own and I found that such code arr[] = $element; } } $a = new A(); $something = new A(); $a->addToArr( $something ); ?> doesn't produce call to read_pr

Re: [PHP-DEV] PHP compiler

2003-08-14 Thread Simeon Koptelov
Hello Jeremy, Wednesday, August 6, 2003, 7:50:57 PM, you wrote: JSJ> After seeing the conversation on the PHP archive idea (having a PHP JSJ> equivalent of a jar file), it reminded me of an idea I had a long time JSJ> ago. Has anyone ever thought of writing a PHP compiler which would JSJ> compile

Re[2]: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Marcus, Wednesday, August 6, 2003, 1:14:10 PM, you wrote: CD>> What about finally ? MB> There's absolute no need for finally: MB> try { MB> } MB> catch (...) { MB> } MB> // here's you're finally code try { $this->allocateSomeResources(); throw new SomeException(); } catch( AnotherE

Re: [PHP-DEV] try/catch/FINALLY

2003-08-14 Thread Simeon Koptelov
Hello Cristiano, Wednesday, August 6, 2003, 6:15:39 AM, you wrote: It would be much better if user will have to put method's throws in method's declaration imho( see my reply to Marcus ). -- Best regards, Simeonmailto:[EMAIL PROTECTED] -- PHP Internals - PHP Runt

Re[4]: [PHP-DEV] PHP compiler

2003-08-14 Thread Simeon Koptelov
Hello Antony, Wednesday, August 6, 2003, 8:43:13 PM, you wrote: AD> If archive is all what you want to get, then what prevents you to write your own class to load files from such package? The performance. Such class in PHP will be much, much slower than language-level support of archives. If s

Re: [PHP-DEV] PHP archive

2003-08-14 Thread Simeon Koptelov
Hello Cristiano, Wednesday, August 6, 2003, 9:00:41 AM, you wrote: CD> What was proposed is something like this: CD> File: application.php CD> include_once ("classes/MyClass.inc.php"); CD> $f = fopen("files/test.txt", "r"); CD> ... ?>> CD> The archive my_application.par (could be an .zip, etc)

Re[6]: [PHP-DEV] PHP compiler

2003-08-08 Thread Simeon Koptelov
Hello Wez, Wednesday, August 6, 2003, 9:30:17 PM, you wrote: WF> This isn't really an internals matter, and isn't going to happen in the core WF> (for various reasons). WF> It is something you can implement yourself using your own extension and the WF> streams API. WF> Can we please drop this th

Re[2]: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-08 Thread Simeon Koptelov
Hello Cristiano, Here's why i think that interface is not good solution. We need the toString method like java's one to safely assume that _every_ object has the string representation. This means we can say $obj1->toString() and $obj2->toString() and don't care if $obj1 and $obj2 do support this

Re[2]: [PHP-DEV] PHP compiler

2003-08-06 Thread Simeon Koptelov
Hello Jeremy, Wednesday, August 6, 2003, 8:16:49 PM, you wrote: JSJ> No that is not what I meant. What I meant is so when you write an JSJ> application using PHP-GTK you could distribute a single executable JSJ> instead of the current method. Personally the current method doesn't JSJ> bother me,

RE:Re[2]: [PHP-DEV] Re: hook cast_object handler in userspace

2003-08-04 Thread Simeon Koptelov
Hello Cristiano, Monday, August 4, 2003, 8:45:20 AM, you wrote: >> CD> Should the method be named "to_string()", "tostring()" or CD> "__tostring()" ? Maybe the __tostring() will be the best because few naming conventions for methods exist. Some people prefer C-like some_method(), some like Java-