Re: [PHP-DEV] PHP ICU project announcement

2007-07-14 Thread Richard Lynch
On Fri, July 13, 2007 2:35 pm, Stanislav Malyshev wrote: We have started a project to make it easier to support international markets using PHP. A number of internationalization functions from IBM ICU will be made available in PHP as an extension. I realize that my natural state is the state

Re: [PHP-DEV] PHP ICU project announcement

2007-07-14 Thread Stanislav Malyshev
So now there's going to be a PHP-ICU extension for PHP 5 and PHP 6, and PHP 6 will have ICU built-in to such an extent that it's backwards compatible with PHP 5? Both extensions would be (are being) written in such a way that code that worked on PHP 5 would work on PHP 6, with regard to the

Re: [PHP-DEV] FW: Simple Namespace Proposal

2007-07-14 Thread Markus Fischer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, as only being a general lurker on this list, I remmeber when Namespaces came up the first time, there were some technical problems (or just syntactical sugar ones?) with the :: operator also being used as a namespace separate additional being a

Re: [PHP-DEV] FW: Simple Namespace Proposal

2007-07-14 Thread Markus Fischer
Hi, as only being a general lurker on this list, I remember when Namespaces came up the first time, there were some technical problems (or just syntactical sugar ones?) with the :: operator also being used as a Namespace separate additional being a class separator. How has this been handled or

Re: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-14 Thread Jani Taskinen
David Wang kirjoitti: This patch is a simple, albeit widespread change that converts access to zval.refcount, zval.is_ref, _object_store.refcount to macros. There is no functional change to the code, but this will make it easier to implement a garbage collector in the future. Was there some

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Jani Taskinen
Sara Golemon kirjoitti: Attached is a patch which exports an internals hook in zend_class_entry for fetching function pointers similar to the object hook get_method() available to instance methods. This patch also exports a userspace hook __call_static() which operates in the fashion of the

Re: [PHP-DEV] PHP ICU project announcement

2007-07-14 Thread Larry Garfield
On Saturday 14 July 2007, Stanislav Malyshev wrote: So now there's going to be a PHP-ICU extension for PHP 5 and PHP 6, and PHP 6 will have ICU built-in to such an extent that it's backwards compatible with PHP 5? Both extensions would be (are being) written in such a way that code that

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Sebastian Bergmann
Jani Taskinen schrieb: As long as you MFH, I don't mind. Yeah, I would love to have this in PHP_5_2, too. :) -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP Runtime

[PHP-DEV] PHP Source Code Help

2007-07-14 Thread Usman S. Ansari
I am trying to debug my custom TCP stack which is running under Linux OS. Do to some bug in my stack or missing feature I am getting error following from php. failed to open stream Which I have traced to file: php-4.4.7/main/streams.c and function: _php_stream_open_wrapper_ex stream

Re: [PHP-DEV] FW: Simple Namespace Proposal

2007-07-14 Thread Stanislav Malyshev
as only being a general lurker on this list, I remember when Namespaces came up the first time, there were some technical problems (or just syntactical sugar ones?) with the :: operator also being used as a Namespace separate additional being a class separator. How has this been handled or are

Re: [PHP-DEV] PHP ICU project announcement

2007-07-14 Thread Stanislav Malyshev
So (from another character-set-intricacy-challenged individual), would ICU it be analogous to the DOM functions for manipulating XML-like structures? (The methods parentNode(), childNodes(), appendNode(), etc. are all supposed to mean the same thing in every language.) I'm not sure I

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Stanislav Malyshev
I'm afraid this change is binary incompatible - it changes class structure, which is in use by extensions. So you'd need 5.3 for that. Sebastian Bergmann wrote: Jani Taskinen schrieb: As long as you MFH, I don't mind. Yeah, I would love to have this in PHP_5_2, too. :) -- Stanislav

Re: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-14 Thread Stanislav Malyshev
Was there some particular reason to remove those ()'s around the macros? (usually they're there for a reason :) Also, extra ; is not needed and doesn't conform to the style of other PHP code. Macros usually don't need ; at the end. Also, these: +#define ZVAL_ADDREF(pz)

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Stanislav Malyshev
The Apache2handler SAPI should be loaded first, and read the very first line of the PHP script to determine if a version is specified there. If not, the handler needs to load its default PHP version. If it is specified, it should try to load that version, and if it couldn't find or load that

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Stanislav Malyshev
And there is no reason not to release 5.3 is there? I'd also like to MFH the namespace patch for PHP 5. well, that's topic for another discussion, I just wanted to remind that it can't be in PHP_5_2. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Jani Taskinen
And there is no reason not to release 5.3 is there? I'd also like to MFH the namespace patch for PHP 5. --Jani Stanislav Malyshev kirjoitti: I'm afraid this change is binary incompatible - it changes class structure, which is in use by extensions. So you'd need 5.3 for that. Sebastian

RE: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-14 Thread David
Hi, Thanks for getting back to me quickly. Was there some particular reason to remove those ()'s around the macros? (usually they're there for a reason :) The reason for doing this is that in GC code ++(pz)-refcount; becomes ++(pz)-refcount; (pz)-color__gc = GC_BLACK;. Those are two

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Richard Lynch
On Wed, July 11, 2007 9:02 pm, chris# wrote: Getting 2 PHP modules to co-exist without tromping on each others' symbols is, I think, the show-stopper... It was possible to have PHP3 and PHP4 both as modules, I think, but that was an anomoly? So which one of the developers broke this

Re: [PHP-DEV] What is the use of unicode.semantics in PHP 6?

2007-07-14 Thread Richard Lynch
On Wed, July 11, 2007 9:14 pm, Rasmus Lerdorf wrote: Richard, you are rather confused on this Unicode stuff. I'm 100% certain we can all agree on that point. :-) The fact that PHP and ICU uses UTF-16 internally has absolutely nothing to do with what is exposed at the scripting level. But

Re: [PHP-DEV] What is the use of unicode.semantics in PHP 6?

2007-07-14 Thread Tomas Kuliavas
But if you write: $a = マニュアル; echo $a[1]; Whoa. That was weird... It was just a bunch of question marks when I read it, and now it's a bunch of symbols (variants on afz mostly) in my reply... Your browser or operating system does not support Japanese symbols and translation selected in

Re: [PHP-DEV] PHP Source Code Help

2007-07-14 Thread Antony Dovgal
On 14.07.2007 10:51, Usman S. Ansari wrote: I am trying to debug my custom TCP stack which is running under Linux OS. Do to some bug in my stack or missing feature I am getting error following from php. failed to open stream Which I have traced to file: php-4.4.7/main/streams.c and function:

Re: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-14 Thread Antony Dovgal
+#define ZVAL_ADDREF(pz)++(pz)-refcount; +#define ZVAL_ADDREF_M(pz, count) (pz)-refcount += (count); _M? Doesn't seem to be self-descriptive.. +#define ZVAL_ADDREF_NP(pz) ++(pz).refcount; _NP ? not pointer ? Most of the macros in the engine

RE: [PHP-DEV] What is the use of unicode.semantics in PHP 6?

2007-07-14 Thread Tomas Kuliavas
That sounds good in my ears. Software that relys on old non-unicode behaviour must be written in a way two handle non-unicode and Unicode behaviour in two different ways. But for example a rewritten Squirrelmail that runs exlusively on PHP6 would be a good thing. So you could write on your

Re: [PHP-DEV] PHP ICU project announcement

2007-07-14 Thread Tim Starling
Stanislav Malyshev wrote: Hi all! We have started a project to make it easier to support international markets using PHP. A number of internationalization functions from IBM ICU will be made available in PHP as an extension. I notice normalization is not on your list. Would you consider

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Tijnema
On 7/14/07, Stanislav Malyshev [EMAIL PROTECTED] wrote: The Apache2handler SAPI should be loaded first, and read the very first line of the PHP script to determine if a version is specified there. If not, the handler needs to load its default PHP version. If it is specified, it should try to

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Rasmus Lerdorf
Tijnema wrote: On 7/14/07, Stanislav Malyshev [EMAIL PROTECTED] wrote: The Apache2handler SAPI should be loaded first, and read the very first line of the PHP script to determine if a version is specified there. If not, the handler needs to load its default PHP version. If it is

RE: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-14 Thread David
+#define ZVAL_ADDREF(pz) ++(pz)-refcount; +#define ZVAL_ADDREF_M(pz, count) (pz)-refcount += (count); _M? Doesn't seem to be self-descriptive.. It was supposed to stand for multiple', but you're right that it's not very clear. +#define ZVAL_ADDREF_NP(pz)

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Rasmus Lerdorf
Rasmus Lerdorf wrote: Not to sound too elitist here, and this is directed just at you Argh! That should of course have been, this isn't directed just at you... -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-14 Thread Jeff Moore
On Jul 11, 2007, at 4:43 PM, David Wang wrote: On the Template test, maxmium memory usage with unmodified PHP was 1.5 GB with an execution time of 30 seconds. On the Template test, maxmium memory usage with gc was 67.3 MB with an execution time of 1 minute. ... As you can see, there is the

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Larry Garfield
On Saturday 14 July 2007, Tijnema wrote: So from a tiny non-representative sample, I'm looking at about 2 out of 6 webhosts I've experienced. YMMV I never saw a shared host with more than one PHP version installed actually, probably becaues they were all with Apache and not with

Re: [PHP-DEV] __call_static() Magic Method

2007-07-14 Thread Sara Golemon
Thomas Moenicke wrote: This is actually a very good idea. I had to put a hook into the opcode handler for static method calls to get the same result which is not really elegant. I was waiting for this feature for a couple month. Also I found out that the names of the static methods are already

Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-14 Thread David Wang
I have a patch adding the GC that's taken against the patch I submitted earlier (converting accesses to refcount and is_ref to macros). Patch: http://web.pdx.edu/~way/frommacros.diff.txt The two new files, zend_gc.c and zend_gc.h go in the Zend folder: http://web.pdx.edu/~way/zend_gc.c

Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-14 Thread Rasmus Lerdorf
David Wang wrote: Is it possible that total server throughput with gc could actually be better than unmodified php by preventing swapping at some higher level of concurrent requests? Yes, that's certainly true if it becomes the case that concurrent requests take up so much memory that they

[PHP-DEV] Re: PHP ICU project announcement

2007-07-14 Thread l0t3k
Great news... i was waiting for some movement on this front. i suppost there will be web project space for this ? also, i'd like to see specs if available. i may have some spare cycles to put some work in. in addition i have some code sitting around implementing various bits of i18n

Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-14 Thread Jeff Moore
David, On Jul 14, 2007, at 1:55 PM, Rasmus Lerdorf wrote: It is still extremely rare for code to have cyclic references. So while GC could prevent swapping in the case of a malicious user, or in the case of a coding mistake, I don't think the general case of typical code running under

[PHP-DEV] Patch to add single-quote heredocs

2007-07-14 Thread Gwynne Raskind
So I was using create_function() in various ways, and I said to myself, this would look SO much better if I could use a heredoc that acted like a single-quoted string. Then I said to myself, Wait. I know the PHP internals. Why don't I build a new syntax into the language? The result was a

Re: [PHP-DEV] toString() and Object #ID

2007-07-14 Thread Stephan Schmidt
Hi Pavel, Pavel Shevaev wrote: Folks, is this really wanted behavior? Because if so, why does the following result in the same hash as well(PHP-5.2.1)? $ php -r class Foo{};$foo = new Foo();var_dump(spl_object_hash($foo));$foo-bar = 1;var_dump(spl_object_hash($foo)); string(32)

Re: [PHP-DEV] Simple Namespace Proposal

2007-07-14 Thread Hans Lellelid
As someone that has long clamoured for namespaces in PHP, I have to say that this proposal by Dmitry is exactly what I others have been hoping for in PHP. Thanks, Dmitry, for creating this patch. I'm sure there are going to be some peculiarities that need to be sorted out, but I can't wait

Re: [PHP-DEV] Apache handler with Multiple PHP versions

2007-07-14 Thread Tijnema
On 7/14/07, Rasmus Lerdorf [EMAIL PROTECTED] wrote: Tijnema wrote: On 7/14/07, Stanislav Malyshev [EMAIL PROTECTED] wrote: The Apache2handler SAPI should be loaded first, and read the very first line of the PHP script to determine if a version is specified there. If not, the handler needs