Re: [PHP-DEV] Tests - and a question
Stanislav Malyshev wrote: I think it does. If one needs to see which tests there are or are there any tests that test particular thing or inspect certain aspects of a functionality, navigating a maze of func_01234.phpt, all alike, is a nightmare. Of course, I could open all of them one by one and remember which one does what - that is if I were a being with unlimited lifespan, infallible memory and never felt bored - but for regular human it's a painful experience. So when writing a new tests it would be very good to give them names that make sense, it doesn't cost anything and helps people. Renaming old ones might be somewhat boring task, so not sure anybody ever would do that... I'm happy to rename as we work through - if we can see an obvious and more descriptive name. Also, what about making the test directory structure match the functional reference for core functions? Some of it does at the moment (strings, array) but it would be good to put all the variable handling tests in ext/standard/tests/variable_handling for example. It's another thing we could do as we go along... Zoe Slattery IBM UK -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] dom strange behaviours
hi, looks like you have an problem or this has been fixed with php 5.2.2. Or can you maybe explain what you expect? my results are: Current PHP version: 5.2.2 getting id -- getAttribute('id'): getAttribute('xml:id'):one getAttributeNS('xml','id'): getAttribute('at'): getAttribute('xml:at'):one getAttributeNS('xml','at'): getting id -- getAttribute('id'): getAttribute('xml:id'):two getAttributeNS('xml','id'): getAttribute('at'): getAttribute('xml:at'):two getAttributeNS('xml','at'): -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings
Hi all, After an off-list discussion with Dmitry, the patch has been updated. Mostly to remove old rules I had left (that returned T_CHARACTER, etc.) since the new super rules can match what they did. So now every piece of a non-constant string returns T_ENCAPSED_AND_WHITESPACE. I also added comments to the new stuff to hopefully help explain the purpose/logic behind it a bit better. :-) Dmitry would like to commit the changes on Friday. I don't have the updated patch for HEAD finished yet, but it's coming soon... The updated 5.2 patch is at the same address, http://realplain.com/php/scanner_optimizations_5_2.diff, and the original was moved to http://realplain.com/php/scanner_optimizations_5_2-v1.diff Thanks, Matt - Original Message - From: Matt Wilmas Sent: Thursday, April 12, 2007 Hi all, I think I first realized that PHP's scanner splits non-constant strings into many pieces after reading Sara's How long is a piece of string? blog entry[1] last summer. At the time I didn't know much about the internals and didn't know if anything could be done to change it. Then in the fall I finally took a look at the scanner ;-) and thought it would be possible to only split strings at variables. Finally a few months ago, I began working out the changes -- it was working almost 2 months ago, but then I got sidetracked :-/ from doing some more testing and making a few semantic token changes till now. So anyway, now heredocs and interpolated strings should be pretty much just like constant strings and concatenation (except for the extra INIT_STRING opcode). They scan/parse/compile faster (with less memory), run faster, and there's less to free when destroying opcodes. With a simple string like This is $var string (say $var = 'some'), I found the compile/cleanup time to be up to 50% faster, and runtime 55% faster! (Note: To test compile time, I eval()'d about 50 of them in an if (0) {...} block.) The difference will be *much more* depending on how many pieces there would've been before (e.g. longer). The more complex rules increased the size of Flex's tables about 40%. However, removing the old heredoc end rule, which used the ^ beginning-of-line operator, made the YY_RULE_SETUP macro be empty, saving some space. The net result was an 8K/12K larger binary in 5.2/HEAD. I was surprised at the overall performance increase without the ^ rule. Its saving a few operations per match made just about as much difference as Flex's -Cfe table compression (was playing with that first :^)) when compiling the code from Zend/bench.php (5% I think). This was with a Windows ZTS build. Running ApacheBench on a few different scripts showed pretty nice overall improvements -- 10-15% was common in my quick tests. BTW, removing that ^ rule lifts the requirement that the character before the closing heredoc label must be a newline as defined by your operating system, to quote the manual. Now some of the other changes: The ST_SINGLE_QUOTE state was removed from 5.2, like in HEAD. A string like $$$ is considered constant now, since that's really what it is, right? CG(zend_lineno) wasn't incremented before if a \n or \r newline (not \r\n) followed a backslash in a non-constant string. \{ returned T_STRING instead of T_BAD_CHARACTER like any other invalid escape sequence. (Note: Of course these won't usually match now anyway, but will be part of a longer string.) I removed HANDLE_NEWLINES() from the code that scans a string's text, instead doing the newline check in the escape-checking loop, to prevent scanning twice. And I removed the additional boundary check in HANDLE_NEWLINES() and elsewhere since I didn't see the need -- AFAIK in all cases you'll only hit '\0'. I removed the one EOF rule since it was missing some states and it wasn't doing anything that the default EOF rule doesn't by calling yyterminate(). In zendlex(), the goto target doesn't need to recheck CG(increment_lineno) since it hasn't changed, and I simplified the closing tag newline check (also looked like it would miss \r ones). Sorry for the long message! I'll send another if I think of something I forgot to mention. Here are the patches: http://realplain.com/php/scanner_optimizations.diff http://realplain.com/php/scanner_optimizations_5_2.diff Appreciate any feedback, or questions about any of it. :-) Thanks, Matt [1] http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] RE : [RFC] Starting 5.3
From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Actually, I would say it would be better to have some minimized version which is extract-only, has all the comments stripped, etc. for inclusion in the archives. There's a difference between phar and PHK here. PHK is not a deployment tool. Because of the high-level features it provides at runtime (as the autoloader, access protection, and others) and also as a design choice, a PHK archive is distributed and runs as-is. If you want a deployment tool, take phar or any other 'auto-extracting' script available, but please don't use PHK for this. Well, actually, it is possible to extract the files from an archive. It is provided as a built-in utility feature, but just to view the files, not to run them after extraction. I don't want PHK to be used as a deployment tool because one of its main goals is to make sure that, once it is packaged and distributed, your application/library will keep its integrity. The configuration files are put outside of the archive and the archive is viewed as a virtual read-only file tree. This is quite the same as a binary executable file, even if we are in an interpreted world here. Would you consider it serious if you had to recompile your httpd file, for instance, after any configuration change ? No, you are used to have a never-changing httpd and, somewhere else, your configuration files. PHK tries to enforce the same philosophy. It is not just a sort of PHP-oriented tar-like toolbox like phar, it tries to provide a high-level service to package maintainers, allowing them to distribute their applications in a cleaner way than what is possible today. And I am currently going further this way as I am currently adding a built-in feature to extract default configuration files from a package at runtime. This way, the package designer will just have to where the default conf lies in the virtual tree, and the user will have a standard way to extract them on installation. Another example of this philosophy is the ability to digitally sign a PHK package, as it is another way to get sure that the file won't be modified after it is distributed by a trusted source. We can argue endlessly on the case as, on one side, Greg and Marcus seem to consider that these high-level features (which represent 90 % of PHK) are just small easy-to-do additions to phar-like features, and on the other side, I do consider that it makes a huge difference for the typical phar/PHK user. Once again, if I had done PHK for my exclusive use, I would have stopped at the same feature level as phar. But I am not interested in a project where I limit the audience to php-internals members :) It is just a choice. Now, php-internal members, read the docs, try both tools on YOUR software, compare the time and efforts it took in both cases, and make your own opinion. But, please, make a TECHNICAL choice, don't base it on friendship or personal links. Best regards Francois -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Tests - and a question
Hello Zoe, It would be nice thing to have mapping between categorization of the functions in the php doc and the source/test tree structure but keeping the tree structure as per the source code is better thing to do. If i have got it right as of now the testcases are places based on the location of the source file. For example testcases testing functions in the ext/standard/array.c are placed in ext/standard/tests/array dir, ext/standard/tests/reg.c is placed in ext/standar/tests/reg/ dir and so on. Testcases for functions found in the Zend dir are placed in Zend/tests dir. It would be nice to have the following addition to ext/standard/tests dir with respect to variable handling functions ( varible handling funnctions are implemented by different source file,e.g : type.c, var.c, Zend/zend_builtin_functions.c, etc) : A sub dir type (ext/standard/tests/type) where all the testcases testing functions in type.c can be placed, currently its placed in general_functions(ext/standard/tests/general_funtions) dir A sub dir var (ext/standard/tests/var) where all the testcases testing functions in var.c can be placed, currently they are placed in general_functions(ext/standard/tests/general_functions) dir, and so on. Doing this way its makes is very easy for locating a testcase and give better dir structure for test organization. It would be nice if these details were documented on php.net, May be right place is qa.php.net under the doc how to write test. Marcus, Tony and others, Any comments from you ? Also notice that we have done commit of some string functions(strcasecmp, strcmp, strncmp) in string dir, which should have been committed in Zend/tests dir because those functions are implemented by source file placed in Zend dir. Best Regards, Raghubansh, IBM India On 5/16/07, Zoe Slattery [EMAIL PROTECTED] wrote: Stanislav Malyshev wrote: I think it does. If one needs to see which tests there are or are there any tests that test particular thing or inspect certain aspects of a functionality, navigating a maze of func_01234.phpt, all alike, is a nightmare. Of course, I could open all of them one by one and remember which one does what - that is if I were a being with unlimited lifespan, infallible memory and never felt bored - but for regular human it's a painful experience. So when writing a new tests it would be very good to give them names that make sense, it doesn't cost anything and helps people. Renaming old ones might be somewhat boring task, so not sure anybody ever would do that... I'm happy to rename as we work through - if we can see an obvious and more descriptive name. Also, what about making the test directory structure match the functional reference for core functions? Some of it does at the moment (strings, array) but it would be good to put all the variable handling tests in ext/standard/tests/variable_handling for example. It's another thing we could do as we go along... Zoe Slattery IBM UK -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RE : [RFC] Starting 5.3
On 5/16/07, LAUPRETRE François (P) [EMAIL PROTECTED] wrote: Now, php-internal members, read the docs, try both tools on YOUR software, compare the time and efforts it took in both cases, and make your own opinion. But, please, make a TECHNICAL choice, don't base it on friendship or personal links. Given the answers (or lack of), my personal decision is yet done (I was unsure until now). It is not necessary to bundle this extension. The large audience will use the archives directly, as it can be run as a standalone script. The other usages are package maintainers or developers (as in pear.phar for example) needs. They can install an extension (or the PHP script versions like phpk or php_archive) in seconds. --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] dom strange behaviours
kepbepos kepbepos wrote: Hi all, I've some problems with getAttribute* methods. I thing it is a bug, but before send it, I'd like to propose a little test to you all, just to have a confirmation (maybe is my installation only). PHP 5.2.x has correct behavior (see bug 38474) based on W3C specs. http://bugs.php.net/bug.php?id=38474 Rob -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
[EMAIL PROTECTED] wrote: ID: 41401 Updated by: [EMAIL PROTECTED] Reported By: drlippman at yahoo dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: Windows, Linux PHP Version: 4.4.7 New Comment: [2007-05-15 15:44:07] drlippman at yahoo dot com Description: Left-to-right order of operations does not appear to be honored when dividing by a negative Reproduce code: --- 1/-2*5 Expected result: -2.5 Actual result: -- -.1 Should all these three examples give the same result? $ php -r 'var_dump(-1/2*5, 1/-2*5, 1/2*-5);' float(-2.5) float(-0.1) float(-2.5) Regards, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
On 16/05/07, Uwe Schindler [EMAIL PROTECTED] wrote: Should all these three examples give the same result? $ php -r 'var_dump(-1/2*5, 1/-2*5, 1/2*-5);' float(-2.5) float(-0.1) float(-2.5) They should all give -2.5! But I think normal programmers will use braces in such situations... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php If you use variables, then this works fine ... php -r $a = 1; $b = -2; $c = 5; var_dump($a/$b*$c); float(-2.5) -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
Michael Wallner wrote: [EMAIL PROTECTED] wrote: ID: 41401 Updated by: [EMAIL PROTECTED] Reported By: drlippman at yahoo dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: Windows, Linux PHP Version: 4.4.7 New Comment: [2007-05-15 15:44:07] drlippman at yahoo dot com Description: Left-to-right order of operations does not appear to be honored when dividing by a negative Reproduce code: --- 1/-2*5 Expected result: -2.5 Actual result: -- -.1 Should all these three examples give the same result? $ php -r 'var_dump(-1/2*5, 1/-2*5, 1/2*-5);' float(-2.5) float(-0.1) float(-2.5) According to my memory of Please My Dear Aunt Sally these should be: -1/2*5 = -.1 1/-2*5 = -.1 1/2*-5 = -.1 So, that is bad if PHP answers that way. Someone please correct me if my memory is wrong. Is there some rule that negative values should be done first before positive values? -- Brian Moon Senior Developer -- http://dealnews.com/ It's good to be cheap =) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Tests - and a question
Hello Raghubansh, if such a mapping becomes more important i'd say we go with a xml file mapping maintained in either php-src or phpdoc cvs module. That way we do not have to rename all files and loose history. best regards marcus Wednesday, May 16, 2007, 1:58:42 PM, you wrote: Hello Zoe, It would be nice thing to have mapping between categorization of the functions in the php doc and the source/test tree structure but keeping the tree structure as per the source code is better thing to do. If i have got it right as of now the testcases are places based on the location of the source file. For example testcases testing functions in the ext/standard/array.c are placed in ext/standard/tests/array dir, ext/standard/tests/reg.c is placed in ext/standar/tests/reg/ dir and so on. Testcases for functions found in the Zend dir are placed in Zend/tests dir. It would be nice to have the following addition to ext/standard/tests dir with respect to variable handling functions ( varible handling funnctions are implemented by different source file,e.g : type.c, var.c, Zend/zend_builtin_functions.c, etc) : A sub dir type (ext/standard/tests/type) where all the testcases testing functions in type.c can be placed, currently its placed in general_functions(ext/standard/tests/general_funtions) dir A sub dir var (ext/standard/tests/var) where all the testcases testing functions in var.c can be placed, currently they are placed in general_functions(ext/standard/tests/general_functions) dir, and so on. Doing this way its makes is very easy for locating a testcase and give better dir structure for test organization. It would be nice if these details were documented on php.net, May be right place is qa.php.net under the doc how to write test. Marcus, Tony and others, Any comments from you ? Also notice that we have done commit of some string functions(strcasecmp, strcmp, strncmp) in string dir, which should have been committed in Zend/tests dir because those functions are implemented by source file placed in Zend dir. Best Regards, Raghubansh, IBM India On 5/16/07, Zoe Slattery [EMAIL PROTECTED] wrote: Stanislav Malyshev wrote: I think it does. If one needs to see which tests there are or are there any tests that test particular thing or inspect certain aspects of a functionality, navigating a maze of func_01234.phpt, all alike, is a nightmare. Of course, I could open all of them one by one and remember which one does what - that is if I were a being with unlimited lifespan, infallible memory and never felt bored - but for regular human it's a painful experience. So when writing a new tests it would be very good to give them names that make sense, it doesn't cost anything and helps people. Renaming old ones might be somewhat boring task, so not sure anybody ever would do that... I'm happy to rename as we work through - if we can see an obvious and more descriptive name. Also, what about making the test directory structure match the functional reference for core functions? Some of it does at the moment (strings, array) but it would be good to put all the variable handling tests in ext/standard/tests/variable_handling for example. It's another thing we could do as we go along... Zoe Slattery IBM UK -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
Brian Moon wrote: According to my memory of Please My Dear Aunt Sally these should be: -1/2*5 = -.1 1/-2*5 = -.1 1/2*-5 = -.1 So, that is bad if PHP answers that way. Someone please correct me if my memory is wrong. Is there some rule that negative values should be done first before positive values? My memory was corrected off list. Thanks. Stupid teachers and their mnemonics. But, still, PHP is wrong on 1/-2*5 no? -- Brian Moon Senior Developer -- http://dealnews.com/ It's good to be cheap =) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
Hi Richard, - Original Message - From: Richard Quadling Sent: Wednesday, May 16, 2007 [...] If you use variables, then this works fine ... php -r $a = 1; $b = -2; $c = 5; var_dump($a/$b*$c); float(-2.5) Certainly. :-) The problem seems to be the parser is acting weird as far as precedence goes with 1/-2*5. Matt -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP 6 Preview
Hello internals, I don't see any progress for PHP 6 in the last several months. And we head more and more into a situation where people no longer develop in HEAD and instead develop in 5.2 without caring to MFB. All I know is that we are waiting for the filter extension. As it appears right now, I do not see Pierre doing the job he offered so we need to find somebody else here. Anyone care to jump in who has the indepth knowledge? And besides this filter issue, what are the remaining pieces to be done? Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
On 16/05/07, Brian Moon [EMAIL PROTECTED] wrote: Michael Wallner wrote: [EMAIL PROTECTED] wrote: ID: 41401 Updated by: [EMAIL PROTECTED] Reported By: drlippman at yahoo dot com -Status: Open +Status: Bogus Bug Type: Math related Operating System: Windows, Linux PHP Version: 4.4.7 New Comment: [2007-05-15 15:44:07] drlippman at yahoo dot com Description: Left-to-right order of operations does not appear to be honored when dividing by a negative Reproduce code: --- 1/-2*5 Expected result: -2.5 Actual result: -- -.1 Should all these three examples give the same result? $ php -r 'var_dump(-1/2*5, 1/-2*5, 1/2*-5);' float(-2.5) float(-0.1) float(-2.5) According to my memory of Please My Dear Aunt Sally these should be: -1/2*5 = -.1 1/-2*5 = -.1 1/2*-5 = -.1 So, that is bad if PHP answers that way. Someone please correct me if my memory is wrong. Is there some rule that negative values should be done first before positive values? I'm in the UK and I was taught (over 35 years ago at least) about BODMAS Brackets Orders Division Multiplication Addition Subtraction. http://en.wikipedia.org/wiki/BODMAS -- Brian Moon Senior Developer -- http://dealnews.com/ It's good to be cheap =) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
And besides this filter issue, what are the remaining pieces to be done? There's also some work to be done on supporting more of the icu functionality. It's in progress now. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
Stanislav Malyshev wrote: There's also some work to be done on supporting more of the icu functionality. It's in progress now. Where? Will it be eat it or die when you're done? There've been no replies from core developers to my postings on php-i18n about providing ResourceBundle API except a single notice from Andrei. Regards, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #41401 [Opn-Bgs]: Order of Operations error on divide by negative
Michael Wallner wrote: Should all these three examples give the same result? ^ n't $ php -r 'var_dump(-1/2*5, 1/-2*5, 1/2*-5);' float(-2.5) float(-0.1) float(-2.5) Sorry, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
if someone has specific ICU tasks, i can pitch in. i have some (calendar) locale info fetching code i've been meaning to finish off.. Stanislav Malyshev [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] And besides this filter issue, what are the remaining pieces to be done? There's also some work to be done on supporting more of the icu functionality. It's in progress now. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
Michael Wallner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Where? Will it be eat it or die when you're done? There've been no replies from core developers to my postings on php-i18n about providing ResourceBundle API except a single notice from Andrei. i think i chimed in as well... there is a post over in i18n from Norbert Lindenberg on the same issue.. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
l0t3k wrote: Michael Wallner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Where? Will it be eat it or die when you're done? There've been no replies from core developers to my postings on php-i18n about providing ResourceBundle API except a single notice from Andrei. i think i chimed in as well... You did, but you didn't come back. there is a post over in i18n from Norbert Lindenberg on the same issue.. I know, I replied that I didn't understand why he wants to create a new file format. No response--so, it's probably me... Regards, -- Michael -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings
The updated 5.2 patch is at the same address, http://realplain.com/php/scanner_optimizations_5_2.diff, and the original was moved to http://realplain.com/php/scanner_optimizations_5_2-v1.diff I've noticed a slight difference between how PHP worked without and with this patch. Previously, if you had this code: echo $arr[123]; then the opcode generated would have 123 as string. Now it has it as number. Not sure if it's important, just to be aware of it. -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
Michael Wallner [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] l0t3k wrote: Where? Will it be eat it or die when you're done? There've been no replies from core developers to my postings on php-i18n about providing ResourceBundle API except a single notice from Andrei. i think i chimed in as well... You did, but you didn't come back. my memory is rusty on this point, but im sure my response was that ICU ResourceBundles are cached per-process by locale identifier, so they would cause issues in mass hosting situations. way back when, i ripped out the RB code and adapted it specifically for PHP, but that code was on a machine that was stolen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: RE : [RFC] Starting 5.3
LAUPRETRE François (P) wrote: From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Actually, I would say it would be better to have some minimized version which is extract-only, has all the comments stripped, etc. for inclusion in the archives. There's a difference between phar and PHK here. PHK is not a deployment tool. Because of the high-level features it provides at runtime (as the autoloader, access protection, and others) and also as a design choice, a PHK archive is distributed and runs as-is. If you want a deployment tool, take phar or any other 'auto-extracting' script available, but please don't use PHK for this. Please STOP spreading misinformation. phar is *not* a deployment tool, even though it can be used this way. Both go-pear.phar and install-pear-nozlib.phar run full-fledged customized PEAR installer code, and use this to do complex tasks like extract internal .tar files and install them to disk. phar is no more a deployment tool than PHP itself is. There is absolutely nothing preventing the creation of a full run-out-of-the-box application, and I have created as demo proof-of-concept a full PEAR installer that can be used to manage a local PEAR repository without the need to install the PEAR Installer as well as a fully functioning phar containing phpMyAdmin. In neither case was anything deployed. Neither go-pear.phar or install-pear-nozlib.phar extract files from *within* the phar and put them on disk. They extract files from .tar archives contained within the phar archive. Well, actually, it is possible to extract the files from an archive. It is provided as a built-in utility feature, but just to view the files, not to run them after extraction. I don't want PHK to be used as a deployment tool because one of its main goals is to make sure that, once it is packaged and distributed, your application/library will keep its integrity. The configuration files are put outside of the archive and the archive is viewed as a virtual read-only file tree. This is quite the same as a binary executable file, even if we are in an interpreted world here. Would you consider it serious if you had to recompile your httpd file, for instance, after any configuration change ? No, you are used to have a never-changing httpd and, somewhere else, your configuration files. PHK tries to enforce the same philosophy. It is not just a sort of PHP-oriented tar-like toolbox like phar, it tries to provide a high-level service to package maintainers, allowing them to distribute their applications in a cleaner way than what is possible today. And I am currently going further this way as I am currently adding a built-in feature to extract default configuration files from a package at runtime. This way, the package designer will just have to where the default conf lies in the virtual tree, and the user will have a standard way to extract them on installation. Another example of this philosophy is the ability to digitally sign a PHK package, as it is another way to get sure that the file won't be modified after it is distributed by a trusted source. the phar extension fully supports signing using md5 and sha1, with plans for gpg signing in the near future. We can argue endlessly on the case as, on one side, Greg and Marcus seem to consider that these high-level features (which represent 90 % of PHK) are just small easy-to-do additions to phar-like features, and on the other side, I do consider that it makes a huge difference for the typical phar/PHK user. Once again, if I had done PHK for my exclusive use, I would have stopped at the same feature level as phar. But I am not interested in a project where I limit the audience to php-internals members :) It is just a choice. PHP_Archive/phar has limited its audience to all users of PHP, and rather than prescribing a rigid model that all phars must conform to, PHP_Archive/phar allows both simple and advanced usage. PHK expects all users to do things the same way. This is the difference. I am writing a proof-of-concept front controller and phar browser and will present evidence of my claim that this is a useful but not intrinsically required feature. I hate to lecture, but your consistently wild exaggerations require some debunking. First of all, every web app is different. Some require some kind of mod_rewrite, some expect to be able to access / and have all URLs hard-coded as such (for instance linking to '/config.php' expecting that this will work). Most of them use include_once with relative paths of some sort, although a few use dirname(__FILE__). phpMyAdmin is loaded with relative includes, which assume that . will contain the files to be included. This means that the files put into the phar (or PHK) require manual modification of ALL includes, so that code like include 'blah.php'; becomes include 'phar://alias.phar/blah.php'; At the same time, some applications read their own code to detect custom
Re: [PHP-DEV] PHP 6 Preview
Hi Marcus, for making HEAD the main development branch we should try to reduce the number of failing tests. Running run-tests.php -n currently still shows 42 tests failing on my current setup. As long as that many tests fail it's hard to see if a patch breaks anything in there. I recently spent some time on fixing a few of these tests but there is still enough work to be done (especially with run-test.php -u ...) johannes On Wed, 2007-05-16 at 16:21 +0200, Marcus Boerger wrote: Hello internals, I don't see any progress for PHP 6 in the last several months. And we head more and more into a situation where people no longer develop in HEAD and instead develop in 5.2 without caring to MFB. All I know is that we are waiting for the filter extension. As it appears right now, I do not see Pierre doing the job he offered so we need to find somebody else here. Anyone care to jump in who has the indepth knowledge? And besides this filter issue, what are the remaining pieces to be done? Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
On 16.05.2007 18:21, Marcus Boerger wrote: Hello internals, I don't see any progress for PHP 6 in the last several months. And we head more and more into a situation where people no longer develop in HEAD and instead develop in 5.2 without caring to MFB. All I know is that we are waiting for the filter extension. As it appears right now, I do not see Pierre doing the job he offered so we need to find somebody else here. Anyone care to jump in who has the indepth knowledge? And besides this filter issue, what are the remaining pieces to be done? IIRC there were some problems with the streams. Andrei, please correct me if I'm wrong. -- Wbr, Antony Dovgal -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] comment to Bug #41408
Sorry for writing here, but can't comment a closed bug. PHPIniDir C:\Program Files\PHP\ Quoting (all) filesystem paths is always a good idea. For a correct solution you should allways use forwardslashs in the Apache config files, also on Windows: | PHPIniDir C:/Program Files/PHP Regards, Carsten -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
On 5/16/07, Marcus Boerger [EMAIL PROTECTED] wrote: Hello internals, I don't see any progress for PHP 6 in the last several months. And we head more and more into a situation where people no longer develop in HEAD and instead develop in 5.2 without caring to MFB. Please tell these people to MFB. Everyone has to MFB or ask for help if they don't have the time, knowledge or motivation. All I know is that we are waiting for the filter extension. As it appears right now, I do not see Pierre doing the job he offered so we need to find somebody else here. Anyone care to jump in who has the indepth knowledge? This information is incorrect and misguided, please understand what you are talking about before making inappropriate claims. Simply asking me or really any other developer of the filter extension would have been more productive. I do check my email, and am many times on IRC. The filter extension is not holding up PHP 6 except it does not yet support unicode but that's not the point. Right now all of PHP is 60.56% unicode converted. And besides this filter issue, what are the remaining pieces to be done? Now moving on, what you might be referring to is the upcoming input encoding system (again, nothing to do with ext/filter). We have had some (very) long discussions about what has to be done, including some off list, and how to do it. As I remember, there are two people who are in position to complete this task, both Dmitry and myself but neither of us have had the time to finish it yet. The JIT at runtime is done but the input decoding (callback, default values change, errors, etc.) is not finished. About the php6 todos in general, I have to take a look again to the wiki and my todos for the extension I maintain. This long weekend may be a good opportunity to do some planing. --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] delete_global_variable session_unset
/* Sorry if you see this email twice, I sent it to a wrong list initially. */ I recently noticed that session_unset in 5.2 (and probably in 6) uses delete_global_variable which looks up global scope and then deletes variable from it. Fine so far, but it does it in a loop - meaning it looks for the global scope each time anew for each session variable! Also it seems to go through all CVs every time, which seems to be a waste of time too. Any reason not to do it this way: 1. Fetch the global scope 2. For each CV in the global scope, check if it should be deleted against session hash (since we have hashes it should be quick). This way instead of stack depth*number of CVs*number of session vars we get only stack depth+number of CVs*hash lookup time. Which should be much better. So anybody sees any reason not to do it? -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Major optimization for heredocs/interpolated strings
Do we have any good performance testcases for the patch that show how it improves the parser? The updated 5.2 patch is at the same address, http://realplain.com/php/scanner_optimizations_5_2.diff, and the original was moved to http://realplain.com/php/scanner_optimizations_5_2-v1.diff -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 6 Preview
Hello Pierre, thanks for the clarification. best regards marcus Wednesday, May 16, 2007, 9:56:25 PM, you wrote: On 5/16/07, Marcus Boerger [EMAIL PROTECTED] wrote: Hello internals, I don't see any progress for PHP 6 in the last several months. And we head more and more into a situation where people no longer develop in HEAD and instead develop in 5.2 without caring to MFB. Please tell these people to MFB. Everyone has to MFB or ask for help if they don't have the time, knowledge or motivation. All I know is that we are waiting for the filter extension. As it appears right now, I do not see Pierre doing the job he offered so we need to find somebody else here. Anyone care to jump in who has the indepth knowledge? This information is incorrect and misguided, please understand what you are talking about before making inappropriate claims. Simply asking me or really any other developer of the filter extension would have been more productive. I do check my email, and am many times on IRC. The filter extension is not holding up PHP 6 except it does not yet support unicode but that's not the point. Right now all of PHP is 60.56% unicode converted. And besides this filter issue, what are the remaining pieces to be done? Now moving on, what you might be referring to is the upcoming input encoding system (again, nothing to do with ext/filter). We have had some (very) long discussions about what has to be done, including some off list, and how to do it. As I remember, there are two people who are in position to complete this task, both Dmitry and myself but neither of us have had the time to finish it yet. The JIT at runtime is done but the input decoding (callback, default values change, errors, etc.) is not finished. About the php6 todos in general, I have to take a look again to the wiki and my todos for the extension I maintain. This long weekend may be a good opportunity to do some planing. --Pierre Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php