Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Lukas Smith
Steph Fox wrote: Where would you want to start UPGRADING from? The main problem I faced with the 5.1.0 version was not knowing how far back to go... or what to count 'in'. E.g. something that was only in CVS for a few weeks and no releases - should that be included? Needs some thought for

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Lukas Smith
Lukas Smith wrote: Steph Fox wrote: Where would you want to start UPGRADING from? The main problem I faced with the 5.1.0 version was not knowing how far back to go... or what to count 'in'. E.g. something that was only in CVS for a few weeks and no releases - should that be included?

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Steph Fox
Where would you want to start UPGRADING from? I think realistically to keep the work somewhat manageable we should focus on providing disjunct steps. 4.4 - 5.0 5.0 - 5.1 .. 5.y - 6.0 If we find we have more resources to invest into this, we can inline some of the hints from previous

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Steph Fox
Someone upgrading from 4.4 to 6.0 would then have to work through a ton of guides obviously. I guess there may be something that get reverted in between (like E_STRICT on var), but those should be rare. There could of course be improvements to changes or ease previous BC breaks. So of course

Re: [PHP-DEV] Template Linkage for a PhpClassFactory in C++

2006-03-14 Thread Michael Walter
I could be missing the point (only skimmed your mail), but you need to include your template implementation in every source file that tries to instantiate the template, e.g. by adding the code to the header file (the alternative, that is, explicitely instantiating the template in factory.cpp,

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Rasmus Lerdorf
Ron Korving wrote: If this is possible, like Dmitry said, with a macro, that would be interesting. I'm curious what this macro would look like. Personally, I tend to go for the less readable solution if the performance advantage is definately there. A little comment to the code should always

RE: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Dmitry Stogov
#define INI_IS_TRUE(str) \ (((str)[0] == 'O' || ((str)[0] == 'o') \ (str)[1] == 'N' || ((str)[1] == 'n') \ (ste)[2] == 0)) || \ (str[0] == '1' str[1] == 0)) But it make sense only if it really gives speedup. Dmitry. -Original Message- From: Ron

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Ron Korving
Oh right, okay. For a moment I thought you were talking about a variable-length case insensitive string compare based on this principle :) Your macro seems like a good idea to me. The function I was talking about was an apache-flag checking function, not php.ini, but I guess this could just as

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Edin Kadribasic
Ron Korving wrote: Oh right, okay. For a moment I thought you were talking about a variable-length case insensitive string compare based on this principle :) Your macro seems like a good idea to me. The function I was talking about was an apache-flag checking function, not php.ini, but I guess

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Ron Korving
It's probably not measurable, but a lot of small improvements like these may be measurable. I don't know how often this situation occurs per request, but if it happens for all apache config flags and php.ini flags, it may be worth improving. If an improvement is not measurable per request (but

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Ron Korving
Thanks for the info. I do have a Linux box, but that one needs uptime. I'll need a new one I can screw up while developing on it. I think I'll buy me one soon, so I can do these kind of things in the future. Thanks again, Ron Rasmus Lerdorf [EMAIL PROTECTED] schreef in bericht news:[EMAIL

RE: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Dmitry Stogov
Php.ini is parsed only on php startup (not on each request). So this improvement will not give to much. Dmitry. -Original Message- From: Ron Korving [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 2:49 PM To: internals@lists.php.net Subject: Re: [PHP-DEV] Re: Calling

[PHP-DEV] Re: New Operator

2006-03-14 Thread Cristiano Duarte
Jason Garber wrote: Hello internals, Since nobody could seem to agree on a language construct for accessing a variable that you don't know exists (ifsetor), I would like to propose a simpler approach. It returns the value of the passed variable, or NULL if the variable does

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Pierre
On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: Pierre and all, A while ago I suggested to add an UPGRADING file for the PHP 6 upgrade, where we'd document every time we break BC and how to solve that. For example, with nuking register_globals we could write what we broke, and if really

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Andi Gutmans
At 06:28 AM 3/14/2006, Pierre wrote: On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: Pierre and all, A while ago I suggested to add an UPGRADING file for the PHP 6 upgrade, where we'd document every time we break BC and how to solve that. For example, with nuking register_globals we could

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Jochem Maas
Dmitry Stogov wrote: Php.ini is parsed only on php startup (not on each request). So this improvement will not give to much. potentially-simpleton-thought er - forgive me if what I say is stupid but if php is being pun as a CGI isn't startup overhead incurred on each and every request? also

Re: [PHP-DEV] Re: New Operator

2006-03-14 Thread Brian Moon
$ConfirmCode = (isset($_GET['ConfirmCode']) ? $_GET['ConfirmCode'] : ''); I agree that this is really a PITA, but until we get an operator for this, we should stuck on the ternary. Another option is to use settype(); This has two advantages. One, if the variable does not exist, settype

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Andi Gutmans
At 07:13 AM 3/14/2006, Pierre wrote: On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: At 06:28 AM 3/14/2006, Pierre wrote: On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: Pierre and all, A while ago I suggested to add an UPGRADING file for the PHP 6 upgrade, where we'd document

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Pierre
On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: We agree on that, yes. I was even in the first to ask for migration docs. However a migration doc is not supposed to document how to keep doing things badly. Well at least document the first part and I'll make sure the second happens. It's

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Andi Gutmans
Yeah that sounds good. Maybe change UPDATE to UPDATING Thanks! At 07:30 AM 3/14/2006, Pierre wrote: On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: We agree on that, yes. I was even in the first to ask for migration docs. However a migration doc is not supposed to document how to keep

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Hannes Magnusson
On 3/14/06, Pierre [EMAIL PROTECTED] wrote: On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: We agree on that, yes. I was even in the first to ask for migration docs. However a migration doc is not supposed to document how to keep doing things badly. Well at least document the first

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Rasmus Lerdorf
Andi Gutmans wrote: At 07:13 AM 3/14/2006, Pierre wrote: Intranet apps does not need to be secure? That's new to me. Depends what it is. A lot have to be secure, but some don't. For example, some apps are on local networks (for example a group Wiki), which are inaccessible outside a

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Andi Gutmans
That's obviously not what I meant... but I've been in situations where there were LANs which were inaccessible by outside sources... Never mind.. Not worth the discussion :) Andi At 07:35 AM 3/14/2006, Rasmus Lerdorf wrote: Andi Gutmans wrote: At 07:13 AM 3/14/2006, Pierre wrote: Intranet

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Pierre
On 3/14/06, Andi Gutmans [EMAIL PROTECTED] wrote: That's obviously not what I meant... but I've been in situations where there were LANs which were inaccessible by outside sources... Do you know that most of the security or attacks problems come from coworkers? :) --Pierre -- PHP Internals -

RE: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Dmitry Stogov
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 6:03 PM To: Dmitry Stogov Cc: 'Ron Korving'; internals@lists.php.net Subject: Re: [PHP-DEV] Re: Calling performance geeks Dmitry Stogov wrote: Php.ini is parsed only on php startup

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src / NEWS

2006-03-14 Thread Pierre
On Tue, 14 Mar 2006 07:32:15 -0800 [EMAIL PROTECTED] (Andi Gutmans) wrote: Yeah that sounds good. Maybe change UPDATE to UPDATING First draft commited in: php-src / README.UPDATING_TO_PHP6 --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

[PHP-DEV] Re: ZSTR cast to union not working on g++

2006-03-14 Thread Cristiano Duarte
Should I have opened a BUG report instead ? It's just an one line patch... Let me know if I need to open a BUG report. Regards, Cristiano Duarte -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Passing a C++ Class Member Function to the (*create_object) in zend_class_entry

2006-03-14 Thread Andrew Mather (BT Std)
Is it possible to pass a C++ member function to the create_object member in zend_class_entry ? This would allow a factory-like generator of zend/c++ object pairs. error: argument of type ` zend_object_value (MyClassFactory::)(zend_class_entry*, void***)' does not match

[PHP-DEV] PHP Embedded

2006-03-14 Thread Marco
Hi All The company I am doing some work for is currently using the php_embed to access the php engine from within a windows based c++ application. I have been asked a question that I dont know the answer to and all my googling attempts have failed. Is there a way from within the embedded system

Re: [PHP-DEV] Passing a C++ Class Member Function to the (*create_object) in zend_class_entry

2006-03-14 Thread Andrei Zmievski
How much C++ programming have you done previously? -Andrei On Mar 14, 2006, at 10:45 AM, Andrew Mather (BT Std) wrote: Is it possible to pass a C++ member function to the create_object member in zend_class_entry ? This would allow a factory-like generator of zend/c++ object pairs.

Re: [PHP-DEV] Re: New Operator

2006-03-14 Thread Cristiano Duarte
Brian Moon wrote: $ConfirmCode = (isset($_GET['ConfirmCode']) ? $_GET['ConfirmCode'] : ''); I agree that this is really a PITA, but until we get an operator for this, we should stuck on the ternary. Another option is to use settype(); This has two advantages. One, if the variable

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Johannes Schlueter
Hi Mark, On Tuesday 14 March 2006 20:48, Marco wrote: Is there a way from within the embedded system to destroy all created variables so that the environment is the same as when it was started or do we need to shutdown the embedded engine and start it up again? PHP was designed as an language

[PHP-DEV] Celebration and thank you - C++ class factory for php objects

2006-03-14 Thread Andrew Mather
To Jay Smith, Marcus Boerger, George Schlossnagle, Sara Golemon, Michael Walter in particular, and all who've kindly responded to my struggle to upgrade my C++ to handle my hopes on php, thank you. We now have a C++ class factory for generating Php objects derived from C++ classes, as I'd

Re: [PHP-DEV] Re: New Operator

2006-03-14 Thread Brian Moon
But you still don't have a default value, just an empty default value(string, zero, etc.). You can't i.e. initialize $_GET[ConfirmCode] with Yes using settype... Oh, you want an operator to do that? Does some other language have this that we are wanting to copy here? Seems overly complicated

Re: [PHP-DEV] Re: New Operator

2006-03-14 Thread Nico Edtinger
Brian Moon wrote: Oh, you want an operator to do that? Does some other language have this that we are wanting to copy here? IIRC C# 3.0 adds a new operator ?: written as foo = bar ?: 'default value';. I tried to search a resource with some documentation about this new operator, but

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Mark Evans
Is this the right book as it has a publish date of March 2005. Hmm, it seems that amazon.co.uk are confused :-) Searching amazon.com gives me Extending and Embedding PHP (Paperback) by Sara Golemon * Paperback: 448 pages * Publisher: Sams (May 24, 2006) * Language: English * ISBN: 067232704X

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Andrey Hristov
Mark Evans wrote: Is this the right book as it has a publish date of March 2005. Hmm, it seems that amazon.co.uk are confused :-) Searching amazon.com gives me Extending and Embedding PHP (Paperback) by Sara Golemon * Paperback: 448 pages * Publisher: Sams (May 24, 2006) * Language:

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Sara Golemon
Is this the right book as it has a publish date of March 2005. Extending and Embedding PHP (Paperback) by Sara Golemon * Paperback: 448 pages * Publisher: Sams (May 24, 2006) * Language: English * ISBN: 067232704X it's pretty strange. at amazon.com the book is listed with

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Marcus Boerger
Hello Ron, the first rule about optimizing is the 80-20 or 90-10 rule or whatever you like more. Either way the idea is that the program spends more than 90% of it's run-time in less than 10% of it's functions. This is a very general idea but nontheless has proven right since people program. On

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread George Schlossnagle
Sara Golemon wrote: Originally George and Wez were going to be writing this book (and may yet do their own version -- that's up to them). Due to innocuous reasons that I can probably talk about but won't to be on the safe side, I wound up taking over the project (and the ISBN number along

[PHP-DEV] PHP Extension - newbie question

2006-03-14 Thread George McLachlan
Hi, I have been lurking on this list for a while, and this is my first post. Sorry it has to be such a daft question. I don't even know if it's the right list, so my apologies in advance. I need to add mysqli support to a web server and our sys admin refuses to do anything unless it

[PHP-DEV] Re: PHP Extension - newbie question

2006-03-14 Thread Sara Golemon
I ran a simple ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib --with-gd This'll build 'em staticly into a new mod_php5.so, but you want just the extension so you can plug it into your existing webserver

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Wez Furlong
I heard something similar; lazy bums the lot of 'em. --Wez. On 3/14/06, George Schlossnagle [EMAIL PROTECTED] wrote: Sara Golemon wrote: Originally George and Wez were going to be writing this book (and may yet do their own version -- that's up to them). Due to innocuous reasons that I

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Rasmus Lerdorf
Slackers that don't write their own books are the worst! Wez Furlong wrote: I heard something similar; lazy bums the lot of 'em. --Wez. On 3/14/06, George Schlossnagle [EMAIL PROTECTED] wrote: Sara Golemon wrote: Originally George and Wez were going to be writing this book (and may yet do

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Michael Vergoz
Hello, I have made an unaccepted php_embed extension available at http://www.badcode.be/~descript/PHP/php_embed/ Take a look at the example : http://www.badcode.be/~descript/PHP/php_embed/examples/pembed_new.c I use this part of code on my software with C++ If you have questions ... Michael

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Mark Evans
Hi Sara The short answer is: call php_request_shutdown(NULL); to kill the active interpreter (one is started implicitly by PHP_EMBED_START_BLOCK(), then php_request_startup(TSRMLS_C); to initialize a new one (the last one active at PHP_EMBED_END_BLOCK() will be impliticly shutdown). Great

Re: [PHP-DEV] PHP Embedded

2006-03-14 Thread Mark Evans
Slackers that don't write their own books are the worst! LOL, I couldnt agree more! :-D Regards Mark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Calling performance geeks

2006-03-14 Thread Ron Korving
Hi Marcus, I'm very well aware of this. But to me, optimizing code to win CPU-cycles is one of the great pleasures I have in programming :). So I am and was fully aware that what I submitted here were probably those less interesting 90% of code that isn't used all the time. But I still enjoy

[PHP-DEV] Re: PHP Extension - newbie question

2006-03-14 Thread George McLachlan
Sara Golemon wrote: I ran a simple ./configure --with-apxs2=/usr/bin/apxs2 --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-zlib --with-gd This'll build 'em staticly into a new mod_php5.so, but you want just the extension so you can plug it into your