Re: [PHP-DEV] Reference equality between objects

2004-09-24 Thread Andrey Hristov
Hi, can we have a macro that implements this equality check - whether 2 zvals point to the same object? Andrey Andi Gutmans wrote: You also have to compare Z_OBJ_HT_P(objA) == Z_OBJ_HT_P(objB) in addition to Z_OBJ_HANDLE_P. After checking both of these your code will work. At 10:57 PM

Re: [PHP-DEV] interface method redeclaration

2004-09-23 Thread Andrey Hristov
George Schlossnagle wrote: Hi, Coogle brought this up, shouldn't this be ok? interface Bar { function foo(); } interface Baz { function foo(); } class A implements Bar, Baz { function foo() {} } Throws a redclaration error in 5.0.1. George Schlossnagle -- Prinicipal

Re: [PHP-DEV] 5.0.2RC1

2004-09-21 Thread Andrey Hristov
Andi Gutmans wrote: I'd like to roll 5.0.2 tomorrow. Has anyone had a chance to test 5.0.2RC1? Can I go ahead? Ilia, when are you planning on rolling 4.3.9? Andi Wasn't there some rule like that releases are made on thursdays? Maybe someone who is under windows may merge the hypot() fix so to be

Re: [PHP-DEV] link add

2004-09-17 Thread Andrey Hristov
Serban Gh. Ghita wrote: hello please add the following link at the link section (php.net/links.php). Romania PHPromania.net (http://www.phpromania.net) - Romanian PHP Community, articles, tutorials, online discussions, forums Serban Gh. Ghita Contact [EMAIL PROTECTED] Andrey -- PHP Internals - PHP

Re: [PHP-DEV] mysql_connect using version 5.0.1 accesses the internet when host and client are the same system

2004-09-16 Thread Andrey Hristov
Sam Hobbs wrote: Rasmus Lerdorf [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am not sure why you assume this to be a PHP problem. I thought I was being reasonable. I thought I was clear about saying I was not sure it is a PHP problem. I was trying to help by helping diagnose a

Re: [PHP-DEV] mysql_connect using version 5.0.1 accesses the internet when host and client are the same system

2004-09-16 Thread Andrey Hristov
Sam Hobbs wrote: Thank you. If that is what is happening then I agree that it is not PHP issue, so I am happy to go elsewhere for help. The only relevant suggestion is that it might help to impove the warning message and to put something in the php documentation to help people know where to

Re: [PHP-DEV] Patch: Rasmus statcallpatch with configure option

2004-09-15 Thread Andrey Hristov
Jan Schneider wrote: Zitat von Derick Rethans [EMAIL PROTECTED]: On Tue, 14 Sep 2004, Andi Gutmans wrote: a) I will try and send internals@ an updated version of the realpath() cache in the next few days. This should give a lot of bang for the buck because realpath() is probably the

Re: [PHP-DEV] Snaps.php.net

2004-09-15 Thread Andrey Hristov
Steph wrote: That's because nobody applied the fix after D's patch yet. -Original Message- From: David Kingma - Jool.nl [mailto:[EMAIL PROTECTED] Sent: 15 September 2004 12:03 To: [EMAIL PROTECTED] Subject: [PHP-DEV] Snaps.php.net Not sure if this is the right place to ask, but the win32

Re: [PHP-DEV] Patch: Rasmus statcallpatch with configure option

2004-09-14 Thread Andrey Hristov
Derick Rethans wrote: On Tue, 14 Sep 2004, Rasmus Lerdorf wrote: That should have been a #ifndef SKIP_PATH_CHECKS there. And it is there to get rid of a non-critical ftell(). Attached is the patch with this corrected, and corrected white space. And yes, there is no doubt that this patch can

Re: [PHP-DEV] [patch] Zend/zend_objects_API.c - bug #29980 (segfault while executing __destruct())

2004-09-10 Thread Andrey Hristov
Well, if the engine is unstable state why the registered shutdown function is being executed then ? :) Andrey Andi Gutmans wrote: I think this makes sense because PHP could be in an unstable state. Think EG(exit_status) covers all possible situations? No time to check now how it differs from

Re: [PHP-DEV] [patch] Zend/zend_objects_API.c - bug #29980 (segfault while executing __destruct())

2004-09-10 Thread Andrey Hristov
Curt Zirzow wrote: * Thus wrote Antony Dovgal: And the last one, the most questionable patch. ATM ZE2 calls destructor at the end of the request and no matter is there were a fatal error (which should probably stop executing the script). In some cases it leads to nasty segfaults (me and report's

Re: [PHP-DEV] info needed regarding TSRM thread local storage

2004-09-09 Thread Andrey Hristov
Hi, probably MBO_0 stands for MarcusBOerger_0 . I am not sure whether this was somewehere in the coding standards document, but this means that the programmer has commented the code by using the preprocessor. The programmer has to put his name and a suffix _0 . Usually code commented this way

Re: [PHP-DEV] XML requirements: Are the docs incorrect ? + ext/soap

2004-08-27 Thread Andrey Hristov
ext/soap pumped up the minimal requirement. It uses xmlBufferCreateStatic which is not found in the 2.5.x libxml2 . I upgraded to 2.6.7 and this helped. Probably when --disable-soap is used one can use 2.5.10+ . For me libxml2-2.5.10-29.i586.rpm (suse 9.0) didn't work. andrey George Schlossnagle

Re: [PHP-DEV] XML requirements: Are the docs incorrect ? + ext/soap

2004-08-27 Thread Andrey Hristov
ok, needs clearance. 2.5.10 didn't work for me when SOAP support was enabled. I didn't try compiling without it since I just needed this extension compiled (usually I leave it out as well as the XML stuff). Andrey Christian Stocker wrote: On 27.8.2004 9:31 Uhr, Andrey Hristov wrote: ext/soap

Re: [PHP-DEV] retrieveing the zval pointer of an object

2004-08-27 Thread Andrey Hristov
isn't the situation that several zvals can reference one object? Andrey Michael Wallner wrote: Hi, I have an hopefully simple question; imagine the following statement: obj = (struct obj_struct *) zend_object_store_get_object(zval TSRMLS_CC); Ok, now I'm in a situation where I'd need the other way

Re: [PHP-DEV] retrieveing the zval pointer of an object

2004-08-27 Thread Andrey Hristov
The engine gurus have the final word :) Andrey Michael Wallner wrote: Hi Andrey Hristov, you wrote: isn't the situation that several zvals can reference one object? Should this be read as No way, sorry? :) Regards, -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

[PHP-DEV] [PATCH] interface_exists()

2004-08-24 Thread Andrey Hristov
Hi, today I saw a note left by a person in the documentation on php.net about the lack of function named interface_exists(). Currently there is class_exists() which returns true always when the name is a declared class or a known interface. However an interface is not a class, some will say that

Re: [PHP-DEV] GOTO operator

2004-08-19 Thread Andrey Hristov
Is it good idea (and is it possible) to disallow GOTO in main() ? Andrey Quoting Robert Cummings [EMAIL PROTECTED]: On Wed, 2004-08-18 at 21:34, BDKR wrote: Hartmut Holzgraefe wrote: Sebastian Bergmann wrote: Exceptions are not an OOP feature per-se. They are a means for out-of-

[PHP-DEV] Checking whether parameter is passed by ref

2004-08-15 Thread Andrey Hristov
Hello, the topic clearly states what I would like to achieve. I know that parameter can be forced to be passed by reference when declared but in my case this is not an option (still). I would like to determine this at run time based on some other conditions I have to check whether the param is a

[PHP-DEV] [PATCH]Bug 26737 : private/protected vars not serialized

2004-08-14 Thread Andrey Hristov
Hi, I have written a patch which I think fixes bug 26737 : private/protected member variables are not serialized (the names are returned from __sleep()) The URL of the patch is : http://hristov.com/andrey/projects/php_stuff/patches/bug26737.patch.txt Comments are welcomed? Thanks, andrey P.S.

Re: [PHP-DEV] Sorting Bug / Wrong behavior?

2004-08-10 Thread Andrey Hristov
Marcus Boerger wrote: Hello Andrey, Can you take a look also at http://bugs.php.net/bug.php?id=29421 We don't affect those. We simply correct the sorting to something understandable when it comes to edge cases with zero. We don't touch any other automatic typeconversion related behavior as

Re: [PHP-DEV] sqlite object-level interface

2004-08-08 Thread Andrey Hristov
[EMAIL PROTECTED] wrote: Marcus Boerger [EMAIL PROTECTED] writes: Hello Derrell, it is a public interface! Unfortunatley we still have no way of documenting classes on the docs page. Thanks. Steph forwarded me this link, which could be provided on the docs page as additional reference, until

Re: [PHP-DEV] GOTO operator

2004-08-03 Thread Andrey Hristov
Quoting DvDmanDT [EMAIL PROTECTED]: And my point still remains. There are an awful lot of PHP programmers out there who really don't need an extra way to write for(), or while(), or do..while(). It makes maintenance work harder when you have a mixture of styles in there to cope with.

Re: [PHP-DEV] list abuse

2004-08-02 Thread Andrey Hristov
Paul G wrote: folks, would someone with ml admin privs take a look and, if present, remove an @tgpwizards.com e-mail address subscription? the user has apparently put a sender confirmation script in place that bombards me (and i'm sure others as well) with confirmation requests. needless to

Re: [PHP-DEV] list abuse

2004-08-02 Thread Andrey Hristov
Quoting Paul G [EMAIL PROTECTED]: - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Paul G [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, August 02, 2004 4:18 AM Subject: Re: [PHP-DEV] list abuse Paul G wrote: folks, Last time I looked

Re: [PHP-DEV] GOTO operator

2004-07-31 Thread Andrey Hristov
Sara Golemon wrote: Thanks for the pointers, I at least see what I need to be exploring now (though I havn't sat down to unfold its meaning yet). Cetainly the implementation given earlier needs work whether its to make it work as advertised or in the more limited fashion suggested in other posts.

Re: [PHP-DEV] Sorting Bug / Wrong behavior?

2004-07-30 Thread Andrey Hristov
Andi Gutmans wrote: I talked to John about this yesterday. I'll take a closer look at this within the coming days to see if this makes sense and how it affects BC in general (if at all). Can you take a look also at http://bugs.php.net/bug.php?id=29421 thanks, andrey -- PHP Internals - PHP

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Ilia Alshanetsky wrote: PHP is a not a type strict language, far from it and it is unlikely it'll ever be such. It is also a not pure OOP language and I very much doubt it'll ever be one. While GOTO can be abused, so can any other language feature, such as OOP, or the ability to include remote

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Robert Cummings wrote: On Thu, 2004-07-29 at 17:25, Timm Friebe wrote: On Thu, 2004-07-29 at 04:12, Sara Golemon wrote: I wrote up a patch for implementing gotos in php scripts a couple months ago as an exercise in working with the Zend engine. [...] In the five or six year's I've been programming

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Robert Cummings wrote: Unmaintainable because of the ability to write cryptic code. There's nothing cryptic about: ...code goto cleanup: ...code cleanup: do { .code... if (something) break; ...code } while (0); ...cleanup code... Similar example in the PHP

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Paul G wrote: - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 29, 2004 8:00 PM Subject: Re: [PHP-DEV] GOTO operator --- snip --- Is the average Joe going to write parsers in the everydays work? Probably

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Sara Golemon wrote: do { .code... if (something) break; ...code } while (0); ...cleanup code... Are you suggesting a hack is better than the real thing? -Sara The hack is working. The manual says : Advanced C users may be familiar with a different usage of the do..while loop, to

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Jason Garber wrote: Hello, I think we should add an INI option: php_newbie true|false ;) better make it : enable_goto = on|off of course making the code non-portable :) andrey p.s. ok guys and ladies, i am going to sleep a little bit (i need recharging). probably without me the ML will be

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Frank M. Kromann wrote: [snip] The average Joe may not need goto in some case but he will find that it simplifies his job (but making code clumsy, something what he does not realize). It is not because I don't like the power of goto, I would like not to be given in the hands of the newbie. andrey

Re: [PHP-DEV] GOTO operator

2004-07-29 Thread Andrey Hristov
Ilia Alshanetsky wrote: On July 29, 2004 09:13 pm, Andrey Hristov wrote: Ok, I surrender. Go for it :) I will pray and let God save me from ever maintaining spaghetti goto code :) Andrey, Well, you already have a list of goto enabled languages to avoid, what's one more? :-) What should I do

[PHP-DEV] Type juggling....again

2004-07-28 Thread Andrey Hristov
Hello internals, in the bug system there is an entry # 29421: (http://bugs.php.net/bug.php?id=29421) In short. in_array() and array_search() return the first boolean(true) when the user looks for an element that evaluates to true according to PHP's type juggling. The opposite is also valid and

[PHP-DEV] lxr.php.net needs new picture

2004-07-26 Thread Andrey Hristov
Currently on lxr.php.net there is at the top of every page an image stating PHP4 Cross reference thanks, andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-24 Thread Andrey Hristov
G usually comes from Globals and I have seen BG in ext/standard so maybe BG means Basic functions Globals. andrey John Lim wrote: Andi, Just a few quick questions. What is the BG macro for? Eg. if (zend_call_function(fci, BG(fci_cache) TSRMLS_CC) == SUCCESS) Secondly, I think i need to

[PHP-DEV] Someone to fix anoncvs.php

2004-07-24 Thread Andrey Hristov
If someone has time and karma it will be nice if anoncvs.php is fixed to add instruction how to checkout 5_0 branch and change the instructions about PHP 5 to PHP 5.1. Thanks, andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-24 Thread Andrey Hristov
John Lim wrote: Andrey Hristov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] G usually comes from Globals and I have seen BG in ext/standard so maybe BG means Basic functions Globals. andrey John Lim wrote: Andi, Just a few quick questions. What is the BG macro for? Eg

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-24 Thread Andrey Hristov
John Lim wrote: Andrey Hristov [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] G usually comes from Globals and I have seen BG in ext/standard so maybe BG means Basic functions Globals. andrey John Lim wrote: Andi, Just a few quick questions. What is the BG macro for? Eg

Re: [PHP-DEV] Calling PHP functions from an extension

2004-07-23 Thread Andrey Hristov
You can find some usage of this function in ext/standard/array.c hth, andrey Quoting Lester Caine [EMAIL PROTECTED]: Andi Gutmans wrote: Check out zend_call_function(). It allows you to cache the function lookup in the fci_cache parameter. Where is the best place to find

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Andrey Hristov
is make test showing problems? (i am just currious). I will try to review the patch later today (atm i am sick). andrey Cristiano Duarte wrote: Hi all, I needed to intersect an array with database records indexed by the primary key, with an array with keys and there is no php function that will do

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Andrey Hristov
think the changes are minimal, so is it possible to merge into 5_0 ? Cristiano Duarte wrote: Andrey Hristov wrote: is make test showing problems? (i am just currious). I will try to review the patch later today (atm i am sick). Nope. Make test shows the same errors before and after the patch. I

Re: [PHP-DEV] array_intersect_key

2004-07-21 Thread Andrey Hristov
Well, i think I have found a buggie (not related to these functions and I want to investigate it). Thus I will delay the commit. Cristiano Duarte wrote: Andrey Hristov wrote: Hallo Cristiano, these 2 function will be added to HEAD in few minutes. I see that the patch is kind of trivial and won't

[PHP-DEV] New member of the community - Diana Coggeshall

2004-07-21 Thread Andrey Hristov
Hello all, John is since 2 days a father of a nice baby girl : http://blog.coggeshall.org/archives/129_Welcome_Diana_Katheryn_Coggeshall.html congrats, andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Fwd: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_language_parser.y zend_language_scanner.l

2004-07-16 Thread Andrey Hristov
Well, the new word clone made the same : class a{ function clone() {} } is not working anymore :) andrey Sterling Hughes wrote: ?php function null() { } null(); ? ?php class connected { function true() { } } if (connected::true()) { echo bar; } ? On Fri, 16 Jul 2004 09:26:33 +0200, dharana

Re: [PHP-DEV] current commit policy for HEAD?

2004-07-14 Thread Andrey Hristov
I would say to wait 2 or 3 weeks. This time is not critical for the code that is laying aside for months. In my opinion the bug system will start to fill up with new bugs in the next days or 2-3 weeks. Some percentage of these bugs will be easy to fix. If the branch happens now, a bug hunter has

Re: [PHP-DEV] Setting memory_limit fails

2004-07-07 Thread Andrey Hristov
Peter Rendl wrote: Edin Kadribasic wrote: Memory limit checking is not compiled in on Windows. So bugs must be caused by something else. Unfortunately phpinfo() does not show compile options for this build. But http://snaps.php.net/win32/snapshot.log contains this line snapshot: forcing

Re: [PHP-DEV] tidy-repairString and repairFile

2004-07-04 Thread Andrey Hristov
Nuno Lopes wrote: Hello, Today I was finishing writing the tidy docs and I've noted that the functions $tidy-repairString() and $tidy-repairFile() simply don't work! And I think these functions should be removed. I'll explain: non-OO way: ? echo tidy_repair_string($html); ? OO way: ? $tidy = new

Re: [PHP-DEV] tidy-repairString and repairFile

2004-07-04 Thread Andrey Hristov
Quoting Nuno Lopes [EMAIL PROTECTED]: Maybe John has to make this methods static and they will work just like the functions. Regards, Andrey Thats a good idea! But as we already have the non-OO function, I don't know if it worth to create the static methods. Nuno For the purists

Re: [PHP-DEV] Please confirm behaviour of ZEND_ACC_STATIC

2004-07-02 Thread Andrey Hristov
Quoting l0t3k [EMAIL PROTECTED]: in my extension, i have a class which has methods which work slightly differently depending on whether or not they are called statically. as an example : $original = new UnicodeString(HELLO WORLD,utf8); $lower = UnicodeString::toLowerCase($original);

Re: [PHP-DEV] strspn() strcspn() speed improvements

2004-06-15 Thread Andrey Hristov
Privet Alex, is it possible to show some results from benchmarking? Thanks a lot, Andrey Quoting Alexander Valyalkin [EMAIL PROTECTED]: My versions of strspn() strcspn() use faster and clear algorithm. Below I provide simple test application, which compares speed and results of old

Re: [PHP-DEV] Re: protected/private access and var_dump/print_r

2004-05-20 Thread Andrey Hristov
Andi Gutmans wrote: At 11:42 AM 5/18/2004 +0200, Christian Schneider wrote: Sara Golemon wrote: var_dump($someobject); shows only public properties (as I'd expect), but print_r($someobject) shows all properties (explicitly identifying protected/private props). I agree with Derick and Andrey in

Re: [PHP-DEV] Re: protected/private access and var_dump/print_r

2004-05-20 Thread Andrey Hristov
Sara Golemon wrote: I hope that everyone will be happy with this. var_dump() is still BC since it does not print :public on public properties. Fine with me. I'm not sure printing public is a bad idea. How many ppl actually use this in their application for purposes other than debugging? I sure

Re: [PHP-DEV] protected/private access and var_dump/print_r

2004-05-18 Thread Andrey Hristov
Hallo Marcus, then will you cut the protected/private functionality from print_r() (so the engine). Probably not :) . IMO var_dump() has been always superior for usage to print_r(). During his presentation at the last conference Derick had to change print_r() in his example to var_dump() to show

Re: [PHP-DEV] Construct Request

2004-04-15 Thread Andrey Hristov
Sean Coates wrote: Jason Garber wrote: function setor($param, $default) { return (isset($param) ? $param : $default); } I tested it on 4.3.4 and 5.0 RC1, and it worked. Is passing an undefined variable as a reference parameter a legal thing to do in PHP? That bring up an interesting

Re: [PHP-DEV] Exceptions and Errors

2004-04-12 Thread Andrey Hristov
Derick Rethans wrote: I think it's a stupid idea (actually OO is a stupid idea but that's something for another dicussion ;-): 1. In order to silently ignore failed queries you still have to put a stupid try..except block around it. If it's used only in object context. 2. KISS: PHP is

[PHP-DEV] Deferencing index of an array returned from function call

2004-04-03 Thread Andrey Hristov
Hi internals, maybe I am late for this for PHP 5 but just want to ask for opinion about dereferencing indexes of arrays returned by functions. In PHP 5 is possible to dereference member variables of an objects like : someFunc()-someMember; but this : $b = someFunction()['someIndex']; is not

Re: [PHP-DEV] Re: RC2

2004-04-01 Thread Andrey Hristov
Quoting Lester Caine [EMAIL PROTECTED]: Andi Gutmans wrote: After all the studlyCaps API fixes What impact will this have on all existing PHP applications and extensions? -- Lester Caine - L.S.Caine Electronic Services -- PHP Internals - PHP

Re: [PHP-DEV] Studlycaps and MySQLi

2004-03-26 Thread Andrey Hristov
Quoting Derick Rethans [EMAIL PROTECTED]: On Thu, 25 Mar 2004, Andi Gutmans wrote: OK Guys. It's decision time. I suggested to move to studlyCaps and keep consistency with the new PHP 5 changes. If we go with this, I think we should make these changes ASAP and try and aim for RC2

Re: [PHP-DEV] Re: Optional parameter for debug_print_backtrace()

2004-03-19 Thread Andrey Hristov
how hard that would be. Andi At 11:56 PM 3/18/2004 +0100, Andrey Hristov wrote: Hi internals, what do you think about adding an optional parameter to debug_print_backtrace() (PHP 5 only) so instead of printing the stacktrace to get it as string. The information provided

[PHP-DEV] Optional parameter for debug_print_backtrace()

2004-03-18 Thread Andrey Hristov
Hi internals, what do you think about adding an optional parameter to debug_print_backtrace() (PHP 5 only) so instead of printing the stacktrace to get it as string. The information provided by debug_print_backtrace() is more than the information provided by debug_backtrace(). So if the

[PHP-DEV] Segfault in Reflection

2004-03-01 Thread Andrey Hristov
Hi, this : php -r 'class a{function a(){}} $a=new Reflection_Class(a);$b=$a-getMethod(a); $b-invoke(NULL);' segfaults on my machine and generates bus error on Jan Lehnardt's machine. Andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV]Re : Segfault in Reflection

2004-03-01 Thread Andrey Hristov
Andi Gutmans wrote: Did this happen after my commit or is it a general problem? Andi At 02:03 PM 3/1/2004 +0100, Andrey Hristov wrote: Hi, this : php -r 'class a{function a(){}} $a=new Reflection_Class(a);$b=$a-getMethod(a); $b-invoke(NULL);' segfaults on my machine and generates bus error

Re: [PHP-DEV] Segfault in Reflection

2004-03-01 Thread Andrey Hristov
Andi Gutmans wrote: Did this happen after my commit or is it a general problem? Andi At 02:03 PM 3/1/2004 +0100, Andrey Hristov wrote: Hi, this : php -r 'class a{function a(){}} $a=new Reflection_Class(a);$b=$a-getMethod(a); $b-invoke(NULL);' segfaults on my machine and generates bus error

Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible with that of Foo::__construct()

2004-02-26 Thread Andrey Hristov
Marcus Boerger wrote: Hello Timm, i had the same expirience today too. And also for me it makes not much sense. The constructor shouldn't check inheritance rules. And as a consequence maybe interfaces shouldn't allow constructors. Does inheritance include visibility rules? ;) Andrey -- PHP

Re: [PHP-DEV] FW: [PATCH] Bug #24064: Standard deviation

2004-02-10 Thread Andrey Hristov
Hi Paul, may you compile your PHP binary with --enable-debug and after that run your sample scrit for once. See if there are leaks. Andrey Quoting Paul Hudson [EMAIL PROTECTED]: Er, either the php-internals MARC archive doesn't show all attachments, or my diff file got stripped en

[PHP-DEV] Changing the visibility of constructors?

2004-02-09 Thread Andrey Hristov
Hello internals, what's your opinion on whether the constructors must follow one of the principles of the polymorphism - The visibility in extending classes must be the same or better. Example : class parent { public function __construct() { } } class child extends parent { private function

[PHP-DEV] __clone() has problem with the vision. maybe needs glasses? :)

2004-01-28 Thread Andrey Hristov
Hi internals, in the following code __clone() have problems with member variables of type object ($this-obj is null). If the comment is removed from the call to __clone2() in __clone() then __clone2() also has problems with the vision. On the other hand __clone2() has no problems when called

[PHP-DEV] Fun with interfaces (Iterator fun)

2004-01-28 Thread Andrey Hristov
Hi internals, here goes some interface fun : class FubarOK has no problem implementing Iterator. interface NewIterator just extends Iterator and adds nothing, and here comes the fun - an error message when FubarProblem tries to implement NewIterator. Code : ?php class FubarOk implements Iterator

Re: [PHP-DEV] HEAD, make install, install-pear.php, iterotor fatal errors

2004-01-28 Thread Andrey Hristov
Pierre, maybe this has something to do with Zeev's commits from this morning. Maybe this one : http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.519r2=1.520ty=u Andrey Pierre-Alain Joye wrote: Hello, Using current HEAD, I got the following errors in make install-pear: ... Installing

Re: [PHP-DEV] Problems with Windows RC from snaps

2004-01-28 Thread Andrey Hristov
This is known issue and the problem was introduced this morning. A snapshot from yesterday will work. regards, Andrey [EMAIL PROTECTED] wrote: I downloaded the latest Windows zip of 5 from snaps this morning. It's php-win32-200401281930.zip. When I try to run either php or php-cgi, I get a long

Re: [PHP-DEV] Problems with Windows RC from snaps

2004-01-28 Thread Andrey Hristov
A commit to fix the problem was just committed. You have to wait for the next win32. Andrey [EMAIL PROTECTED] wrote: Thanks for the answer, but I don't see any snaps for yesterday. I only see a snaps from 1/21 and then snaps from today 1/28. I tried the zip file from 1/21 but it crashed also. It

[PHP-DEV] PHP5RC1 release this week?

2004-01-27 Thread Andrey Hristov
Andi, are you going to release PHP5RC1 this week or on Monday? As far as I remember you said that it will be released at the end of January and this week is the last week of January. Thanks, Andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] Casting of objects to array exports private/protected data

2004-01-17 Thread Andrey Hristov
Hi internals, casting an object to array gives the possibility to get the values of protected/private member variables : ?php class some { public $pub = 1; protected $prot = 2; private $priv = 3; } var_dump((array)new some()); ? Produces : array(3) { [pub]= int(1)

Re: [PHP-DEV] Casting of objects to array exports private/protected data

2004-01-17 Thread Andrey Hristov
Pierre-Alain Joye wrote: On Sat, 17 Jan 2004 16:44:29 +0100 Andrey Hristov [EMAIL PROTECTED] wrote: IMO, when casting to array with (array) only the public-ly visible members should returned. Dunno, E_STRICT (as you can access them without notice/warning without this flag)? In the same manner

Re: [PHP-DEV] README.PHP4-TO-PHP5-THIN-CHANGES

2004-01-17 Thread Andrey Hristov
Hi, Stefan Walk wrote: This has been discussed on internals before. See http://www.zend.com/lists/php-dev/200310/msg00026.html and follow-ups. Thanks for pointing out this discussion. Andrey -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] interfaces extending multiple interfaces

2004-01-16 Thread Andrey Hristov
Hi, Hans Lellelid wrote: Is there any way to have an _interface_ implement or extend multiple interfaces? This was working as of PHP5b3, but seems to work no longer as of latest snapshot I downloaded. The only way to do it before was to have an interface implement other interfaces: interface

Re: [PHP-DEV] Brachning PHP5_0 from HEAD

2004-01-14 Thread Andrey Hristov
Hi, Andi Gutmans wrote: At 01:18 PM 1/14/2004 +0100, Andrey Hristov wrote: I prefer waiting for RC1 to start a new-features branch. At least we then know that we're on the right track. There are still some minor changes going on (besides bug fixes) in tidy and SimpleXML. What change do you want

[PHP-DEV] SNMP2 support

2004-01-14 Thread Andrey Hristov
Hi internals, follows a message (note from the php.net site which was rejected) It contains a patch to add SNMP v2c support. I have no knowledge of SNMP but I think someone can review and say whether it's good or not, or maybe it can be applied if it's ok. Original URL :

[PHP-DEV] new function?

2004-01-13 Thread Andrey Hristov
Hi internals, I know HEAD is freezed, but anyway to ask whether a new function in_array_all() can be added. It works like in_array() but checks whether all needles are in the stack array. Diff : http://www.hristov.com/andrey/projects/php_stuff/in_array_all.diff.txt Best wishes, Andrey -- PHP

Re: [PHP-DEV] Re: new function?

2004-01-13 Thread Andrey Hristov
Hi Christian, Christian Schneider wrote: Andrey Hristov wrote: It works like in_array() but checks whether all needles are in the stack array. Looking at the prototype: bool in_array_all(mixed needle1[, mixed needle2], mixed haystack [, bool strict]) I'd say if (and I'm personally -1

Re: [PHP-DEV] Re: new function?

2004-01-13 Thread Andrey Hristov
Hi, just a correction, I meant array_diff when i wrote array_intersect. array_diff is more handy since just count($res)==0 is enough, $res is the returned array of array_diff(). Andrey Andrey Hristov wrote: So, I did now some testing. Looks like in_array_all() is 6x faster than array_intersect

Re: [PHP-DEV] Re: new function?

2004-01-13 Thread Andrey Hristov
Hi Andrei :) Andrei Zmievski wrote: On Tue, 13 Jan 2004, Andrey Hristov wrote: Hi, just a correction, I meant array_diff when i wrote array_intersect. array_diff is more handy since just count($res)==0 is enough, $res is the returned array of array_diff(). Did you actually try array_intersect

Re: [PHP-DEV] Re: new function?

2004-01-13 Thread Andrey Hristov
Hi, I didn't write this function to be faster. You asked about array_intersect() and I decided to bechmark (you didn't ask for it though). What I had in mind when I decided to write it was to escape this : if (in_array(some_element, $haystack) in_array(other_element, $haystack)

Re: [PHP-DEV] Ability to lower PHP memory usage

2004-01-08 Thread Andrey Hristov
Andi Gutmans wrote: At 06:43 PM 1/8/2004 +0200, Jani Taskinen wrote: On Thu, 8 Jan 2004, Wez Furlong wrote: As Stas mentioned, I'm not sure that this is a good idea, unless we split some of these things out of ext/standard and into their own extensions; ext/std_regex, ext/std_string (for

Re: [PHP-DEV] new win32 snapshot: php_mysql.dll not found error

2004-01-08 Thread Andrey Hristov
Hi Dan, there is something borked. mysql_drop_db() is deprecated and on the doc page there is a note : [snip] Warning This function will not be available if the MySQL extension was built against a MySQL 4.x client library. [/snip] There is something borked with the libs that you use? Andrey

[PHP-DEV] PHP in CLI mode uses output_buffering. Opinions anyone?

2004-01-02 Thread Andrey Hristov
Happy new year internals, on 31st I filled a bug report named PHP in CLI mode uses output_buffering the bug number is 26755 : http://bugs.php.net/bug.php?id=26755 . Few minutes ago Edin submitted a patch that fixes the behaviour for PHP5 but we decided to ask whether it is suitable to merge this

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated

2003-12-18 Thread Andrey Hristov
Andi Gutmans wrote: At 10:24 PM 12/18/2003 +0100, Derick Rethans wrote: On Thu, 18 Dec 2003, Andi Gutmans wrote: In any case, I do think that the custom error handler being called for any error is bogus. Why should E_STRICT or E_NOTICES be sent to the handler if they are off? So you're

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Andrey Hristov
Christian Schneider wrote: Andrey Hristov wrote: Look like I am an weirdo :) with an web farm of servers which log every NOTICE that appear. And even I think it was possible to catch a fatal error that happens in a required file with the way the error handler works now. And what exactly keeps

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault, and msgs about deprecated

2003-12-18 Thread Andrey Hristov
Stig S. Bakken wrote: Good question. Having an error handling function becomes really expensive if your code is not E_ALL-clean in a loop or something. if you set a custom error handler you know what you are doing and probably don't have such places in the code :) IMHO the error_reporting

Re: [PHP-DEV] Re: error_handler, was [PHP-DEV] B3, pear segfault,

2003-12-18 Thread Andrey Hristov
Christian Schneider wrote: Andrey Hristov wrote: Good question. Having an error handling function becomes really expensive if your code is not E_ALL-clean in a loop or something. if you set a custom error handler you know what you are doing and probably don't have such places in the code

[PHP-DEV] BC broken for strrpos()/strripos()

2003-12-02 Thread Andrey Hristov
Hi devs, this night i saw that the BC of strrpos()/strripos() is broken by a patch commited by pollita 7 months ago : http://cvs.php.net/diff.php/php-src/ext/standard/string.c?login=2r1=1.370r2=1.371ty=u The documenation of both function states if the second parameter is an integer instead of

Re: [PHP-DEV] Re: BC broken for strrpos()/strripos()

2003-12-02 Thread Andrey Hristov
Sara Golemon wrote: The documenation of both function states if the second parameter is an integer instead of string then its value is used as a ord of the character to be used during the search. This no more true with HEAD. Good catch. This should not have been broken, I'll fix this.

Re: [PHP-DEV] PHP Benchmark

2003-11-16 Thread Andrey Hristov
Sebastian Bergmann wrote: Sebastian Bergmann wrote: The benchmark suite is available at http://www.sebastian-bergmann.de/PHP_Benchmark/ I added results with the Zend Optimizer 2.1.0. Hi Sebastian, could you add a package (tar.gz, zip, tar.bz2, whatever) to be easy for the end user

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andrey Hristov
On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count gave

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andrey Hristov
Jaap van Ganswijk wrote: At 2003-11-05 09:59 +0100, Michael Walter wrote: Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) I'm also in favor of a shorter notation for array() and list(). In fact this also helps to

Re: [PHP-DEV] regex operators

2003-10-14 Thread Andrey Hristov
Hi, correct me if I am wrong but yesterday I read in a book related to Software Engineering (something called like Classical and Object Oriented Software Engineering with examples in C++) that there was decision that programming languages will be spelled lowecase with the first character in

Re: [PHP-DEV] MonetDB extension

2003-09-30 Thread Andrey Hristov
Manfred Stienstra wrote: Hi, As some might remember from last week, I'm trying to develop a php extension, but I'm having a little trouble getting it compiled... /home/dwerg/code/2003/monetdb/php-4.3.3/ext/monet/monet.c:42: error: `zif_monet_connect' undeclared here (not in a function)

<    1   2   3   4   >