Re: [PHP-DEV] Re: [PHP-CVS] cvs: CVSROOT / avail loginfo
On Thu, 2007-11-29 at 14:56 -0800, Stanislav Malyshev wrote: Having a clear and transparent contribution process is much more important to my eyes than good support for some company's products. No, it is not more important. 99.9% of PHP users don't care what process we have, they care about how well PHP works for them. If we had best process in the world but no support for what people need - people won't use PHP just to commend us for oh so good process. Process is important, but it's a *tool*, not the *goal*. Right, for the users the process isn't important, they only care about the license and the result hat comes out. But still it affects the developers which haven't been consulted either, yet. And it looks like some people (who ever it is in detail) seem to try to put stuff with different rules in CVS without discussing it - which is against the openness of the PHP project as I know it. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] private properties ....
Hi, On Sat, 2007-12-01 at 00:24 +0800, Jingcheng Zhang wrote: Hi Etienne, Is private only an access limiter between classes?If so, I think private properties and methods should be OK to be extended into the child class, but currently that's not the case, and there is also a bug here, consider the following example: The child class is another class, private gives you encapsulation inside the base class's context. and preventing acces from other class's context. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: CVSROOT / avail loginfo
Hi, On Thu, 2007-11-29 at 21:16 +0200, Jacques Marneweck wrote: We do have peer-review after all. Not on CLA'd code we don't. Steph the CLA seems to just relate to the docbook xml specifications for PDO. If the spec is CLAd what will the implementation be? Do you expect a spec needs stronger protection than the code? I'd say it's usually the other way round. On a side-note: It's not only about peer review - without signing the CLA one might still read the code and send reports to the maintainers. But we can't maintain it! This is a major change in the development process, currently everybody with CVS account, which you can get quite easily compared to many other projects, can fix any bugs in every place (ok, Zend/ and TSRMLS/ are a bit limited, but still) and if we decide on a API change, like the recent change with refcounts the required fixes can easily applied. With code, which is bundled and under a CLA everybody who wants to do even simple changes, fixing compile errors, ... is _forced_ to sign it for doing serious work. If the active developers would agree on that (which I don't think will ever happen) then there won't be a problem - but getting it from more or less the outside without prior notification/discussion is plain stupid imo. Rules about the development process have to be set by the developers doing the work, not by companies thinking They did good work, let's benefit from them. (even if they do some work for that - the main work will still be done by others) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: private properties ....
Hi Marco, On Fri, 2007-11-30 at 12:43 +0100, Marco Kaiser wrote: Conclusion: 1. Why i can access a private property from a different class instance (name) but same type ? $aa and $bb are instances of aaa but not the same. Since PHP's object model is based n the class concept and these limitations are bound to the class, not the object. 2. This doesnt works if cc is a own class with same property name (ie. interface or something like this) cc is another class. 3. Is it a bug that i can't use same property name in my child class? (normaly the parent property isnt visible to the child) cc extends aaa. That's a feature: Extended classes know nothing about private stuff in the parent class. Without that the encapsulation won't be complete. Thats just some questions :) And some answers. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: namespace improvements to be committed very soon - final review
Hi, On Tue, 2007-12-11 at 17:13 -0600, Gregory Beaver wrote: Hi, I've been furiously working behind the scenes with Stas and Dmitry, and have some enhancements to namespaces in the form of 2 patches. 1) multiple namespaces per file 2) use ::name; 1) multiple namespaces per file This is implemented as such: ?php namespace one; use Blah::A; // code namespace two; use Foo::A; ? I don't care about multiple namespaces per file, but if we allow multiple namespaces in one file we should also enforce these. If we don't enforce the braces people will write code like above and that's really bad for maintenance. (While it makes me even more happy that I don't do consulting stuff anymore - I don't read other people's PHP code anymore - but from that time I know that people will misuse such a feature) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] namespace improvements to be committed very soon - final review
On Tue, 2007-12-11 at 22:33 -0600, Gregory Beaver wrote: Any brackets adds another set of shift/reduce to the parser, regardless of how the syntax of the language is defined. That's not all with that syntax. ?php { class foo { } } ? Leads to a delayed declaration which is done at run-time, not at compile-time - this might have bigger performance issues than just the shift/reduce in the parser - especially with opcode caches. $ php53 -dvld.active=1 -dvld.execute=0 -r '{ class foo { }}' Branch analysis from position: 0 Return found filename: Command line code function name: (null) number of ops: 5 compiled vars: none line # op fetch ext return operands --- 1 0 NOP 1 EXT_STMT 2 ZEND_DECLARE_CLASS null '%00fooCommand+line+code0x998387c', 'foo' 3 RETURN null 4* ZEND_HANDLE_EXCEPTION Class foo: [no user functions] vs. $ php53 -dvld.active=1 -dvld.execute=0 -r 'class foo { }'Branch analysis from position: 0 Return found filename: Command line code function name: (null) number of ops: 4 compiled vars: none line # op fetch ext return operands --- 1 0 EXT_STMT 1 NOP 2 RETURN null 3* ZEND_HANDLE_EXCEPTION johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: CVSROOT / avail loginfo
Hi, On Thu, 2007-12-20 at 11:40 -0800, Stanislav Malyshev wrote: currently the users seem to live quite good with the licenses granted by the PHP License 3.01. Quite good can be always made better. For example, you may claim PDO is perfect and doesn't need any help from DB vendors, and some may claim it misses some useful features and help from the people that actually make the databases would be great. Wait, in the part I quoted, the one you dropped you said: | As far as I understand, the purpose of the CLA usually is to make | reasonable assurance for the user that the code in the project is | safe to use So you were talking about the purpose was making the user's life safer, now you say that DB vendors need a CLA for contribution. Sorry, now I'm confused. And btw. the mentioned companies, even IBM, seem to be able to contribute without a CLA (with tests and even a few fixes for the engine...) But: Before discussing some random CLAs and such stuff it would be imo good if this group, disucussing PDO, could share their plans - then we could discuss on facts not assumptions, rumors, ... It would be indeed. Let's hope it will happen soon. In the meantime, I'm trying to help what I can :) I hope this comes soon and enlightens me since Im really confused now. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Fixed and enhancements for php odbc layer
Hi Patrick, On Thu, 2007-12-20 at 18:53 +0100, iODBC Maintainer wrote: As maintainer of the iODBC driver manager project i have some fixed and enhancements for the php odbc layer that i would like to submit for review and inclusion into the code base. [...] Please let me know what the appropriate way of sending these patches to the relevant project members, or whether i should post them on this mailing list. You can either report it as a bug at bugs.php.net and provide a patch or send the patch(es) as .txt file (the list will drop attachments of other types) here. In general: The ODBC extension seems to be quite unmaintained, the registered maintainer did his last commit in 2004 if I didn't miss a thing in the log. So, we're happy with any help in that area :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Fixed and enhancements for php odbc layer
Hi Patrick, On Thu, 2007-12-20 at 21:49 +0100, iODBC Maintainer wrote: I have attached 3 diffs as txt files. Each of the files start with a short explanation of what the patch is supposed to do, so it is easier for anyone else to see what i did. Tanks, I don't see a problem with these patches, while I don't really know ODBC. But three comments: - In general we try to avoid adding new ini settings, in general they just make life harder, can't these made connection or query flags? - The update for current versions of iODBC: How new is this new version? (Or other way round: how likely will a system break?) Can old versions be detected and rejected from config.m4? - I hope these stuff won't break with other odbc flavors :-) All three diffs have been made against the PHP_5_2 branch of your CVS tree and should be applied within the ext/odbc directory. Since i cut them in pieces for easy reading, you can expect some warnings about lines, but i checked and all three patches combine fine. PHP_5_2 is the stable branch, new features should go to HEAD and PHP_5_3, while I don't expect big problems with merging these. If there is any problem, please let me know as i am keen to get this to work properly. Additionally if there is a list of TODO items for this module, i will be happy to see if i or my team can be of assistance. There's no specific todo (I know off) but you might take a look at the bug reports, see http://bugs.php.net/search.php?boolean=1limit=20cmd=displaystatus=Openbug_type%5B%5D=ODBC+related for a start. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] spl_autoload vs __autoload
Hi, On Mon, 2007-12-31 at 22:45 +0100, Marcus Boerger wrote: Hello Johannes, I agree with Pierre here. How about finally making SPL built in always like ext/standard? First some statistics: According to my numbers[1], which are as wrong as most other statistics about such stuff. 1% (36 of 3573) of the PHP 5 installations have SPL disabled. So imo having it not forced-on is not a big problem for users. The only ones who might complain about enforcing it are people trying to run PHP on embedded platforms, but they already have to do some changes here and there so I don't see that as a problem either. On the other side, from the internals point of view, I see benefits for us like that we can rely on SPL Exceptions really being there without #ifdef'ing around (see ext/mysqlit - RuntimeException vs. Exception) and such stuff. So in the end I'm +1 on the proposal for 5.3. On a related note: Imo for users the real problems are different extensions, which we won't enable by default (due to their dependency on external stuff) and which might be available on some host or different php.ini settings. For instance I was once annoyed by zlib not being available on a shared host or png not available for gd. While I know that it is hard for us to reach these people (and most of us here aren't interested in shared hosts anyways) that's what I'd like to think about. Many people try to write apps which run everywhere - That's one of the reasons for PHP's success - but this also means they can only rely on a limited set of functionality... johannes [1] Counting installations of a random PHP app (phpMyFAQ) where the user agreed to send the data -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Garbage collector patch
Hi, On Tue, 2007-12-18 at 09:57 -0800, Andi Gutmans wrote: Uhm I meant 5.3. I guess we can commit it but as you know, reverting this kind of stuff later is a headache people don't like doing. With this patch it's not too bad because besides the macros which are committed already it's mostly isolated. So can anybody do the commit then? Thanks. Only enough testing by people on the list will be able to give us additional information re: to the merits of this patch and how we should handle it. My hope people find it stable with negligible performance impact so that we can always keep it compiled in by default. Right, and having it in CVS really helps having many people testing it in different environments. johannes Andi -Original Message- From: Derick Rethans [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 18, 2007 9:20 AM To: Andi Gutmans Cc: Dmitry Stogov; PHP Developers Mailing List Subject: RE: [PHP-DEV] Garbage collector patch On Tue, 18 Dec 2007, Andi Gutmans wrote: Derick Rethans wrote: Maybe we just should put it in cvs then? Then we won't have this issue and other people can test it more easily as well. The only problem with that is what if people get bad benchmarks/results and we want to pull it out? It kind of defeats the purpose to do this in a more structured way. Want us to commit it to a branch? PHP 5.2.x? Neither of those solve the merging issues, so no, not to a branch or 5.2. It should just go to HEAD and PHP_5_3. *If* it seems to be really bad, we can always revert it later. regards, Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] type hinting
Hi, On Sun, 2008-01-06 at 21:24 +0100, Marcus Boerger wrote: That said I would only agree to type hints if we make them respect existing PHP conversion rules. Which we can't really do. Think about Mikko's example: $b = '5'; function foo( int $a ) { echo gettype( $a ); } foo( $b ); echo gettype( $b ); Casting there would, for sure, create problems. Doing no cast fails when thinking about Kore's example: $ php -r 'var_dump( ~1, ~1 );' string(1) � int(-2) Or: $ php -r 'var_dump( 1 ^ 2, 1 ^ 2 );' string(1) int(3) I can see why people want it, but it won't really fit into PHP's type system imo. And about the part being optional: As long as you only use your own code it's optional, sure. But as soon as you use a library or maintain code written by others it isn't optional anymore - while that of course is true for all design decisions made by the previous devs. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: php ldap wit exop patch and missing ZSTR
Hi Faraz, On Mon, 2008-01-07 at 20:53 +0500, Faraz Khan wrote: Dear all, I'm trying to apply the php ldap EXOP patch from : http://www.sys-net.it/~ando/Download/#PHP The patch defines a zstr in ldap.c at line 1731 as obvious below. ZSTR no longer appears to be defined anywhere in php or zend.h - can somebody help me with this? Should i just define it manually? I don't know that patch but a little help: zstr is a PHP 6 type for handling unicode and binary strings. So that patch is either missing some compatibility code or is only for PHP 6. If you want to adopt it either define a zstr using something like typedef union _zstr { char *s; /* void *u; -- If you get an error due a missing u component of that union either try using a void for it or change it to take .s as char* */ void *v; } zstr; or try to change the zstr foos there to char *foo and drop the .s/.u/.v where that var is being used. The original declaration of that type can be found here: http://lxr.php.net/source/ZendEngine2/zend.h#235 Both ways aren't really good, for more I'd have to check the patch, maybe it's best to ask the author of the patch. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Array syntax []
Hi, On Fri, 2008-01-11 at 12:40 +0300, Max Antonov wrote: I use PHP since version 5.0 release I'd like use this syntax $a = [ 2,6,9 ]; $b = ['a'=1 , 'v'='string']; foo(['bar'=2, 'test'=null]); The last line is exactly why I won't like such a syntax. Just consider the a bit worse call like foo([1, $a[2]]); I might even construct worse examples, but in the end you'll have to take a quite close look to see what's going on, whereas the array() syntax directly tells you hey, here's an array, it are just 5 letters, so typing it isn't too hard (especially when using an editor with completion) ... Yes, it's nice in short code, but I think it makes it way harder to read other people's code - and that's already hard enough. (I, myself, would, of course, ( ;-) ) use it right but I tend to read more code than I write) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] SUMMARY: Array syntax
Hi, I did a short count of the votes about the Array Syntax shortcut on the list. I hope I've got everybody right. The results look like that: yesno -- With php-src karma 510 Others16 9 -- Sum 2119 At large the result is that half the people like it, half the people not. Just counting persons with php-src karma (I hope I didn't miss anybody there or attributed somebody wrong) most people are against it. In my conclusion this means: Rejected. The data with all details as OpenCalc sheet can be found on http://www.schlueters.de/~johannes/php/vote_array_shortcut_20080111.ods If you find errors please answer to this mail in private. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] SUMMARY: Array syntax
Hi Pierre, On Fri, 2008-01-11 at 18:37 +0100, Pierre wrote: Yes, you forgot me. And restricting the right to vote to php-src only is respectless for all the documentation people. Well, any restriction there is hard. I know hat the php-src karma is not the best criteria. We have people with karma just for housekeeping and others who contributed to discussions in a good way and certainly know what they are taking about without karma. (no, this doesn't mean that these houskeepers don't know what they are talking about, just to make clear: php-src-karma is not the best criteria) The general assumption I made is that people with php-src karma who are voting spent more time with the project and might be more experienced with the effect of changes to the language than other people who maybe just yesterday found this list. We don't have any stated criteria for such votes and I doubt there's any good and fair one. An important factor for giving people with karma a bit more weight might be that it are these who are going to maintain the change. Non-developers don't care about the C code and fixing bug reports related to them. But well, that doesn't count for all people with karma of course... Additionally: My conclusion wasn't made only on the php-src-karma people. I also think that a difference from one is not a clear vote and we need, imo, a clear vote/consensus if we want a big change to the syntax. But any vote won't be fair. So the best thing would be some consensus - but I see no way for reaching a consensus for a question which mainly is a question of taste. Some people like their steaks medium, others well-done and some don't like steaks at all. There's no way to convince them - but endless discussions. But well in my results I have a problem: For Rasmus's vote I've counted a -1 while as such this syntax is appropriate I think has to be counted as +1. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ifsetor like expression in php6
Hi, On Sat, 2008-01-26 at 16:23 -0500, Robert Cummings wrote: And I thought the whole point was for it to not generate a notice. Isn't that why the name ifsetor was chosen? Since it's supposed to work like isset() by not generating notices? This thing is not called ifsetor. From the commit message: ?: operator [DOC] expr1 ?: expr1 is a shortcut for: expr1 ? expr1 : expr2 as exists in gcc and discussed some time back. Note that this is not an implementation ifsetor($var, default). While ifsetor would not generate any message for non existing variables or array indices the ternary shortcut does. Also the ternary shortcut does a boolean evaluation rather then checking for isset(). That way ther ternary shortcut can work on any expression while ifsetor can only work on variables. Also to be silent one has do do: @$expr1 ?: $expr2. I didn't check the docs, if it is documented as ifsetor there that's wrong. For reasons why there is no ifsetor but this operator please check the archives. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Splitting the subject: the PECL/PHP relationship
Hi, On Sun, 2008-02-03 at 12:24 +0100, Marcus Boerger wrote: MySQLND was the last extension started in php-src and I don't even remember when this was discussed (though in the current structure I like it there pretty much). Actually it was developed internally to MySQL and offered for inclusion when it was stable. So the PECL in that case was svn.mysql.com. I'll write about my opinion to the whole pecl-core topic later (breakfast first) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] faster public domain MD5 implementation
Dmitry, On Tue, 2008-02-05 at 14:34 +0300, Dmitry Stogov wrote: /* * * This is an OpenSSL-compatible implementation of the RSA Data Security, * * Inc. MD5 Message-Digest Algorithm (RFC 1321). ** [...] looks like your editor has gone wild on that comment in md5.c ;-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a final decision
On Tue, 2008-02-05 at 21:23 +0100, Pierre Joye wrote: +1: remove them (as it is now in HEAD) -1: Restore them and always return FALSE (not 0) 0: I don't care, do what you wish, I never use them anyway +1 - remove them Users can easily add these themselves, (if (! function_exists('get_magic_quotes')) function get_magic_quotes() {return false;}} or an compat include) no need to keep them around. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [patch] expose PHP version details as constants
On Mon, 2008-02-11 at 17:51 +0100, Pierre Joye wrote: Yes that name is fine, bunt wondering: When/Where do you get this information and where from? What's the impact for build snapshots/releases? Afaik the scripts for that work on cvs exports where Good point, I did not check the CVS doc before and can't find how to get it in the same way than $Id$. Marcus? :) No, there is no such keyword which offers this information. The only way to get it would be to inject it from the scripts ... but I guess that just leads to trouble afterward. And I don't see much need for the branch info anyhow ... johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [patch] expose PHP version details as constants
Pierre, On Mon, 2008-02-11 at 15:42 +0100, Pierre Joye wrote: On Feb 11, 2008 3:20 PM, Pierre Joye [EMAIL PROTECTED] wrote: On Feb 9, 2008 2:39 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Pierre, yeah nice idea. I am wondering if you might want to add the cvs tag, too? E.g.: PHP_TAG = 'PHP_5_3' I'll commit the patch later today, I think PHP_BRANCHE sounds better than PHP_TAG, or PHP_CVS_TAG (but if we move away from CVS? :-D ) Typo, I meant PHP_BRANCH Yes that name is fine, bunt wondering: When/Where do you get this information and where from? What's the impact for build snapshots/releases? Afaik the scripts for that work on cvs exports where that information isn't available anymore. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [patch] expose PHP version details as constants
Hi, On Mon, 2008-02-11 at 22:30 -0500, Edward Z. Yang wrote: Hello all, I was documenting the __DIR__ patch, and I ran across some curious behavior when the PHP file was in the Windows filesystem root: C:\test.php ?php echo __DIR__; ? Output: C:\ Is this intended? What else would you expect? For me it looks right. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: QA reports
Hi, On Wed, 2008-02-13 at 16:00 +, zoe wrote: I think fixing this is a one line change to qaweb/buildtest-process.php, I'm happy to make that if there is agreement. Please let me know if it isn't as simple as this. As somebody said on IRC, too: Please also change run-tests.php for advising people to use that list for sending in reports, too. (Whereas general test-related discussion stuff should go to qa@) Thanks, johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] OpenID, big_int, OpenSSL
Hi, OpenID is a system gaining more and more support in the industry so PHP should have better support for it, too. some time ago Wez proposed[1] a patch for OpenSSL exporting some big-number-math and crypto stuff from there. Some people thought that that's no clean solution and it would be better to extend pecl/big_int for instance and bundle that. Anybody has time to work on this and createcommit the relevant patches? Thanks, johannes [1] http://marc.info/?l=php-internalsm=117111703809304w=2 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] OpenID, big_int, OpenSSL
On Mon, 2008-02-25 at 23:11 +0100, Pierre Joye wrote: Hi, On Mon, Feb 25, 2008 at 10:31 PM, Johannes Schlüter [EMAIL PROTECTED] wrote: Hi, OpenID is a system gaining more and more support in the industry so PHP should have better support for it, too. some time ago Wez proposed[1] a patch for OpenSSL exporting some big-number-math and crypto stuff from there. Some people thought that that's no clean solution and it would be better to extend pecl/big_int for instance and bundle that. Anybody has time to work on this and createcommit the relevant patches? What's about Dmitry's patch which is already commited: http://marc.info/?l=php-internalsm=118595872426344w=2 oups, didn't remember that commit :-) Thanks, I'll mark it as done on Lukas's wiki. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Replace the flex-based scanner with an re2c [1] based lexer
Hi Derick, On Mon, 2008-03-03 at 09:28 +0100, Derick Rethans wrote: On Sun, 2 Mar 2008, Marcus Boerger wrote: However, we had to drop multibyte support as well as the encoding declare. Just wondering, why did you have to drop the declare(encoding=...) ? It's just ignored in PHP 5.x - and it is useful to have for migrating php 5.3 apps to 6. So can you atleast make the new parser just ignore this statement? It is not ignored in PHP 5 as Marcus and I found out while reading the code :-) If you compile with --enable-zend-multibyte you can change the encoding using declare even multiple times per file using declare it seems. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Replace the flex-based scanner with an re2c [1] based lexer
Hi, On Sun, 2008-03-02 at 14:47 -0800, Stanislav Malyshev wrote: Hi! be much easier, switching to re2c promises a much faster lexer. Actually, without any specific re2c optimizations we already get around a 20% scanner I think 20% faster is very cool. However, as I understand re2c is not a standard tool found everywhere. So what happens if you wanted to use it on some exotic system where re2c is not readily available as manintainer-supported software? Also, flex is available on Windows for example as part of cygwin, while I don't see re2c there. I understand this can be of low importance since we keep generated files in our repositories, but I think we still have to keep it in mind. I understand also current patch requires non-release version of re2c - maybe we should have some release version at least until we make PHP depend on it? We need a change there anyways, flex 2.5.4 is bundled with less systems, even my Solaris 20 box has 2.5.33 instead of 2.5.4 by default. And I think changing to something which is maintained by one of our main contributors might be beneficial for us. Note - pecl/intl does nothing towards multibyte support etc., at least for now. If there are voloteers to change that, it can be discussed, but so far it is for doing entirely other things (locale-dependent functionality mostly). So, I think before re2c parser can be merged the issue with multibyte compatibility must be solved - otherwise it will make the users that rely on it unable to use newer PHP. As cool as 20% faster is, I think we can't drop support for such feature, especially not in 5.3. Commit to 5.3 between the 5th and the 15th of March. Synch to HEAD a couple of days later. Moving pecl/libintl to ext (depends on the 5.3 RMs decision). After that is done, decide about multibyte support. Along with the commit to the 5.3 branch there will be a new re2c version available. I think we first need to figure out what happens to multibyte support, and not commit anything before we have it figured out. Multibyte support is important piece of functionality for some PHP users, and it works now. Breaking it without providing any alternative - especially that we have now 5.3 mostly ready for the release cycle, and solving multibyte problems with re2c may take undefined amount of time, as far as I understand. I do not think it would be acceptable to release 5.3 without multibyte support, so the option here either merge it now and have 5.3 waiting until MB is figured out, or try to figure it out before commit and if we can't in a reasonable term, go forward with 5.3 and defer the parser change for 5.4. Since there's no documentation about zend-multibyte stuff I spent some time searching for other resources about it, but except bug reports I found nothing whee it was required. I'm sure there are some but comments like TODO: support widechars in the code give me the impression that it doesn't really work... and I guess many people just enable it sinceit sounds important not due to the fact that hey really need it. Of course I might be wrong so I'd be interested in use cases for --enable-zend-multibyte stuff. Maybe we can fullfill the needs without the switch. If there are good use cases for that switch I won't like to replace some small engine thingy with a huge external library like ICU. And I doubt that more than just a few people know what it really does - Marcus and I just found out while working on that stuff over the weekend. Again, while I think the speedup is great and congratulate Marcus, Nuno and Scott on great work, I think we should keep in mind we have working parser right now and changing it in an incompatible way is very high-risk and should not be taken hastily. Right, it's great work they did there but a broken scanner would be one of the worst things we might ship. So I'd invite everybody to checkout that version from SVN (see Marcus's mail) and test it using the worst stuff you can think off :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: PHP 5.3 Autoload+Namespaces+Functions incorret (atleast wierd) behaviour.
Hi Fredrik, On Fri, 2008-02-29 at 16:02 +0100, =?ISO-8859-1?Q?Fredrik_Holmstr=F6m?= wrote: Basicly, the call is this: Demo::Functions::test(); where both Demo and Functions are namespaces, and test() is a function inside the Demo::Functions namespace. If you have an autoload handler here and the file containing the Demo::Function::test()-decleration isn't loaded, autoload will be called. Now everything seems fine, but the problem is that when the autoload hooks have all fired php looks for the class Demo::Function, because autoload seems to be interpreting the Demo::Function::test(); call as: Namespace::Class::Function, when it should be Namespace::Namespace::Function, and since the Function class doesn't exist it will trigger a fatal error. autoload was designed for loading classes not functions. Wen resolving Demo::Function::test() and no function having that name is being found it's assumed that Demo is the namespace, function a class name in there and test a static method call. There's no way for the engine to see what else might be meant. So the result is expected and changing it woud mean to do major changes wich just creates new problems. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: PHP 5.3 Autoload+Namespaces+Functions incorret (atleast wierd) behaviour.
Hi Marcus, On Mon, 2008-03-03 at 13:27 +0100, Marcus Boerger wrote: new namespace::class() new namaespace::namedspace::class() and so on, or: namespace::class::functoin() namespace::function() and so on. That is, when detecting braces after it and a new in front than it is a class. If there is no new in front it must be a function and autoload needs to be called for all but the last part. With new it needs to be called for all parts. Since the compiler already knows whether it generates a ctor call we must have an issue that should be fixable. new in front is easy but take you're last example: ns::func() How can we detect, that we don't look for a class called ns with a (static) method func but for a namespace ns with a regular function called func? We do the lookup for ns::func in the function table, then a class lookup for ns and then trigger autoload... So the declaration for the thing called above could either look like ?php namespace ns; function func() {} ? or like ?php class ns { static function func() {} } ? And since we do only autoloading of classes, not functions, the autoload is only triggered looking for the second case. Every approach which might be cleverer would, imo, need some list of known namespaces which the current design doesn't have at all. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] 5.3 Release Planning
Hi all, recently there were quite a few proposals about stuff for 5.3. If we implement them all we won't finish in a soonish time and we get new ideas postponing the 5.3 release therefore the following: - Scanner based on re2c: Going to re2c promises to make maintenance simpler and increase the parsers performance. Currently the prototype does not provide support for Zend multibyte mode. This seems doable within April. Hence I ask for finishing by end of April the latest. Once that is done we will go over to a freeze and switch to bug fixing only mode. If this is done sooner than we'll freeze sooner, too. If there are delays we'll freeze anyways and use the scanner for a later release. - bundling pecl/intl According to Stas it's ready for being bundled and was voted in. The only question I see there is the how to bundle it. There we should definitely find a better thing than symlinking around on the CVS server, an option might be to to switch to subversion and use svn:externals or keeping stuff in pecl and then having some scripts (maybe part of buildconf/the release scripts) fetching them into a checkout. Just ideas ... For the moment symlinking might be the best. - bundling pecl/phar Lots of work has been done there, I'd like to have it in, general PECL discussion: See above. - Large File Support That's a thing on the todo for ages. A patch was proposed by Wez once[1]. The patch should be, according to Wez, improved to use php_config.h for the defines instead of passing them using CFLAGS. Additionally one should mind Joe's comments[2] in that old thread. If somebody has time I'd welcome it, if not: It waited for so long already so it might wait a bit more. ;-) [1] http://www.mail-archive.com/internals@lists.php.net/msg31117 [2] http://www.mail-archive.com/internals@lists.php.net/msg31124 - All the other stuff Extension maintainers always like improving their extensions, There will be improvements to GD I think and other stuff, I don't list that all - the timeline is mentioned above. - FixesTesting Test snaps, report bugs, fix bugs, ... That's the most important thing. That's where really everybody reading this can contribute and do important things. :-) You might miss some stuff in the list above, at first one might think about these: - Traits: Interesting concept, basically most of us want it, some decision about some details needed, then some implementation, i had a short discussion with Stefan and we agreed that we don't call it release critical for 5.3 and plan 5.3 without traits. - Closures/Anonymous functions: Basically the same as with traits, some detail discussions left, then a bit time for updating the patches, not planned for 5.3. Surrounding all this stuff we'd also have another topic we should start working on: Updating guide, something like README.UPDATE_5_2. I think our new wiki might be a good place to create such a list. I'll find some place there and come than back to the list, but you might already start thinking about stuff you know that should be mentioned there. That's again a thing everybody can contribute. That's enough for the moment, johannes PHP 5.3 RM -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: 5.3 Release Planning
Hi, On Thu, 2008-03-06 at 20:43 -0600, Gregory Beaver wrote: Just a quick note: I'd like to consider another possible approach, having pecl/phar synced from stable pecl release. Yes, that's what I'd like, too. Te problem there is that developers using CVS checkouts should get a CVS checkout f it, too so it's being tested and can be fixed if needed. And if you read my mail you see that I mentioned doing it during buildconf, which is better than configure, I think ;-) I am also fine with symlinking until this can be perfected, as it is just an idea to be implemented right now. right. /me has no powers for actually doing that. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Loading PHP Files from a PHP Extension
Hi Jacob, On Sat, 2008-03-08 at 01:50 -0600, Jacob Santos wrote: Anyway, I remember once upon a time a PHP extension which loaded PHP files within the PHP extension MINIT or RINIT function. I had thought it was SPL which did this, but I appear to be wrong. Searching for material on the subject only brings up generic PHP Extension writing. It's SDO in pecl, I think. But I don't think it's a good idea to execute a script while still being in the startup. So you should do that carefully. I thought that php_execute_script() might work, but from the Extending and Embedding PHP book, it is used within the context of Embedding and not Extending PHP. Embedding means calling PHP code from some C app, in your case the C app is an extension, but still, that doesn't matter. You could use php_execute_script, the problem there might be that it also executes auto_[pre|ap]pend files not only your script so it might be better to use zend_execute_scripts. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [RFC] Namespace syntax decision
Hi, On Fri, 2008-03-21 at 22:36 +0100, Marcus Boerger wrote: PHP is very close to Java and C++ in terms of Syntax. And many of our users are familiar with one or even both of them. Also we have a tendency to especially take syntax from those two or be in line with those two languages. That said I see two ways: 1) namespace foo { } 2) package foo; I favor 1) if we allow namespace nesting and 2) if not. The current way of nesting is very confusing: namespace foo; namespace bar; I said in some previous post I won't like multiple namespaces per file using the 2nd syntax. So imo: either on ns per file and the 2nd syntax or allow multiple and use brackets. And then I prefer the latter. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] short_open_tag
Hi, On Fri, 2008-03-21 at 21:13 +0100, Marcus Boerger wrote: Hello Stanislav, Friday, March 21, 2008, 9:08:02 PM, you wrote: However the '?echo' I mentioned would work. We could also go for something like '?phpecho'. I for one would really appreciate it. And I would not ?phpecho is too long. Really, saving one space here isn't worth a trouble. If we had something short and nice like ?= that'd be good and would make PHP templates look clean, but doing ?phpecho instead of ?php echo - how does it make any real difference? The thing is that ?php echo would require a ; while ?phpecho wouldn't. And if you ronly argument is saving a few keystrokes then we should really get rid of short open tags completely. And definitively not making their use easier. You don't need a ; in front of the ? therefore ?php echo $foo ? works, so the only thing ?phpecho saves in fact is one character. The point about ?= is that it is _very_ short. ?=$foo? can work quite nice in simple templating stuff (PHP is a templating language) I also think that there aren't many people who preprocess PHP Hypertext preprocessor files with XML-Tools, and if they do they won't use ?. The XML issue I see there is the conflict with XML-PIs like ?xml which starts PHP's processing. See [1] as a starting point for that. Already the second result there [2] shows a real life example where the patch Stas committed might be useful. In a file called header.php - which certainly isn't the main script - the developer made sure that his script works with both settings, so on the one hand he has to print the ?xml PI using PHP, so there's no problem with short open tags, but for outputting variables on the other hand he uses the long tags since one can't rely on the fact that short tags are working. Using the patch Stas proposed (and committed) this might be made nicer. I could look for my own code where I had the same problem inside complexer stuff, but I guess that random example, which took me 5 minutes to find shows the possible benefit. So as long as we have open tags I'd like Stas' patch. The only downside I see are confused users (Why doesn't that work for the script I have that in) but well, we have such users for all stuff we do ;-) Now we have the big issue: Do we want to have short open tags forever? Well, without tooo much thinking my idea would be to drop ? but keep ?=, ?= shouldn't conflict with ?xml tags in the same file, but make it simple to do templating using PHP, on the other hand when not echo'ing stuff you already have to write more soo the four additional characters (php ) don't matter that much - especially every decent editor/ide should be able to give you a completion on that, if you want. But such a change in the language should go with other breaks to 6.0 or so. johannes [1] http://google.com/codesearch?hl=enlr=q=lang%3Aphp+%3C%5C%3Fphp +echo+%5B%22%27%5D%3C%5C%3FxmlbtnG=Search [2] http://google.com/codesearch?hl=enq=+lang:php+%3C%5C%3Fphp+echo+% 5B%22%27%5D%3C%5C%3Fxml%22 +show:r_a97k72yKQ:0ofXUwlCDds:HkOUVl3hPgMsa=Ncd=2ct=rccs_p=http://managedtasks.com/wpthemes/gespaa_v2.zipcs_f=gespaa_v2/header.php#first -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PECL-DEV] About that PECL versioning thing
Hi, On Sun, 2008-03-23 at 13:01 +0100, Hannes Magnusson wrote: On Sun, Mar 23, 2008 at 3:51 AM, Steph Fox [EMAIL PROTECTED] wrote: does anyone have any objection to the proposal at http://wiki.php.net/rfc/peclversioning? The first step in fixing the core-pecl relationship? \o/ Looks good. But what about extensions that are symlinked to core? Will they need to update their version info during core release cycles? It obviously shouldn't have a -dev version when distributed with PHP.. Is it up to the RM to hunt those extensions down and make sure the version info is accurate? Just removing the -dev in the version number would be wrong (as is symlinking), a Stable PHP release should include stable extensions. Not dev versions of the extension. So one of the ideas is to fetch the last stable extension release for a PHP release, but well, then there's the problem that everybody (people using snaps, people using CVS, ...) end up with different versions which makes QA hard. (not to mention bug hunting trouble with people using the latest release but updated a single extension, ) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: PHP's Zend multibyte support
Hi, On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote: You can provide a --SKIPIF-- section to detect MB support (http://qa.php.net/write-test.php ). --SKIPIF-- ?php if (!in_array(detect_unicode, array_keys(ini_get_all( { die skip Requires --enable-zend-multibyte option; WTF? Where did that INI entry come from? :) It isn't in php.ini-dist and the only docs I can find is (http://no.php.net/manual/en/ini.php): detect_unicode1 PHP_INI_ALL Available since PHP 5.1.0. Removed in PHP 6.0.0. According to my research when the MB issues popped up that setting was added as a hack to help the scanner to have less confusion with it's encoding detection when using __HALT_COMPILER(); There's an internals discussion, but i don't have it at hand right now. Is it really PHP_INI_ALL? That doesn't make much sense to me. I thought the multibyte scanning was compile time? (Or is it like the current short_tags proposal; ini_set(detect_unicode); include ...; ?) Yes, it's for the latter, I guess. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?
Hi, On Wed, 2008-03-26 at 16:07 -0400, George Wang wrote: OK, let's back to the topic, is there any conclusion on this topic yet? I certainly would like not to miss the release of 5.3 and ready to help with any issue. I think it makes sense, you, as the server's vendor, supports it and whatever the exact usage number are there seem to be users who certainly benefit from it. As to user request, here is one :-) http://bugs.php.net/bug.php?id=42987 According to this ticket, this has been assigned to johannes, should I follow up with this ticket to get it going? His last update to the ticket is I saw that some files use another license than PHP License and other refer to an outdated version. when bundling they should be licensed under the current PHP License 3.01. Our LSAPI library code has been license under BSD license, and there are other BSD licensed code get into PHP core, like PCRE, GD, etc. Is that really a concern? Do I have to change it to PHP license? Well, the idea is that all PHP-specific code is licensed under the same license terms. PCRE and GD are external libraries which live outside PHP's context and which are simply bundled. That's why the clear preference there is PHP License. Additionally it would nice to follow the PHP coding standards. Like always having { } after an if statement. This helps PHP developers who might (possibly) help fixing reported (simple) bugs or apply API changes. Other than that we, again, have our problem about what's the best way to bundle something from pecl. I guess the symlink on the CVS server is the best option we currently have... johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Backporting to 5_3
On Wed, 2008-03-26 at 10:04 -0300, Felipe Pena wrote: Hello, I would like know which itens below needs be backported to 5_3: - Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara) Not sure if this has benefits without the encoding stuff which is planned for PHP 6. - Added jump label operator (limited goto). (Dmitry, Sara) No objection, while it adds yet another keyword. - Removed support for continue and break operators with non-constant operands. (Dmitry) -1, also just two use cases were found I don't like to break that with 5.3. - Removed undocumented and incomplete support for strings in list() operator. (Dmitry) What exactly does that change? - Changed instanceof and catch operators, is_a() and is_subclass_of() functions to not call __autoload(). (Dmitry) +1, makes sense. Let me know, and then i could post the patch for aprovation. Please do that. Thanks, johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [RFC] Namespace syntax decision
On Tue, 2008-03-25 at 23:35 -0700, Paul Chandler wrote: Can't both (brackets and non) be supported? NO! This just creates confusion. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [RFC] Namespace syntax decision
Hi, On Fri, 2008-03-21 at 22:36 +0100, Marcus Boerger wrote: we all were asked to stop discussing syntax of namespaces as we were told that we would decide after the namespace functionality was fully implemented. Now I think that the functionallity is pretty much settled we should revisit the syntax. We all have been very patient so far. Anyway here goes my take on it: Allowing multiple namespaces per file using the namespace foo; syntax feels really bad for me. Therefore I basically agree with Marcus on the two options. 1) namespace foo { } 2) package foo; I favor 1) if we allow namespace nesting and 2) if not. The current way of nesting is very confusing: namespace foo; namespace bar; About the options I don't have strong opinions but I see that people want multiple namespaces per file. We aren't like other languages which enforce one class per file and I don't think we should enforce one namespace per file. Therefore I prefer 1). johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Backporting to 5_3
On Thu, 2008-03-27 at 00:48 +0100, Pierre Joye wrote: On Thu, Mar 27, 2008 at 12:34 AM, Johannes Schlüter [EMAIL PROTECTED] wrote: On Wed, 2008-03-26 at 10:04 -0300, Felipe Pena wrote: Hello, I would like know which itens below needs be backported to 5_3: - Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara) Not sure if this has benefits without the encoding stuff which is planned for PHP 6. If the JIT is actually enabled by default (as far as I remember it is not), it can be useful as a request will simply not process any JIT data if it is not actually used. The current behavior now is to do a compile time JIT (detection of possible GPCES usage). The encoding is useless in 5.3 without unicode support, it is binary as we know it ;) And compile time JIT is fine as long as we don't have to care for encoding, right? So this change won't be needed in 5.3. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Backporting to 5_3
On Thu, 2008-03-27 at 01:01 +0100, Pierre Joye wrote: On Thu, Mar 27, 2008 at 12:54 AM, Johannes Schlüter [EMAIL PROTECTED] wrote: And compile time JIT is fine as long as we don't have to care for encoding, right? So this change won't be needed in 5.3. Except when one sends a xxMB post that you are not expecting and will not use. But that has been so for years, too bad though, 5.3 is the perfect time for such thing. which is handled by post_max_filesize and as long as we don't add error handling it doesn't make a difference if that happens at compile- or runtime. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-QA] BC break with php 5.2.6
Marcus, On Mon, 2008-03-31 at 17:14 +0200, Marcus Boerger wrote: Hello Derick, it is a BUG FIX. Not fixing it means more people will turn it into a feature and we will never be able to remove it. Becuase next time you will say we cannot remove it in a minor version as by then you accidentally rely on it yourself. We made a mistake! Lets stand up and admit we did. Probably I was involved in making that mistake, so sorry. Done. I have to agree with Derick here we shouldn't add a fatal error within a bug fix release at such a place. People (hosters...) tend to update versions without checking all incompatibilities - since you don't expect them and they want to get security issues fixed. Yes, the previous behavior was wrong! Yes we shouldn't encourage people do do that. I'd propose making it an Warning or something in 5.2 and fixing it in 5.3. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Is it possible to add support for multiple extensions directory ?
Hi Sririam, On Mon, 2008-03-31 at 13:56 -0700, Sriram Natarajan wrote: In this regard to fit more with Solaris file layout traditions, we would like to keep the core PHP modules under /usr/php5/modules and the user specific downloaded PECL/PEAR modules under /var/php5/modules. However, if I am not mistaken, PHP core doesn't support loading PHP modules from more than one location. So, I was wondering if this feature can be considered within PHP core ? For example, within PHP.ini , a user can more provide more than 1 location to look for PHP extensions extension_dir=/usr/php5/modules;/var/php5/modules As of PHP 5.3 you can use the full path with the extension= directive in php.ini. Additionally you can use identifiers as variables therefore the following would be possible: extension_dir = /var/php5/modules solaris_extension_dir = /usr/php5/modules extension=${solaris_extension_dir}/foo.so extension=bar.so Would that be enough for you? :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: destroy the current object (PDO)
On Wed, 2008-04-09 at 10:14 +0200, Olivier Bonvalet wrote: public function __construct( $dsn, $user, $password ) { try { parent::__construct( $dsn, $user, $password ); } catch( PDOException $e ) { echo 'there is an error... but continue the script', PHP_EOL; } } The correct thing is to either re-throw the PDOException or use your own exception and throw that. } catch( PDOException $e ) { echo 'there is an error... but continue the script', PHP_EOL; throw $e; } Everything else is broken on oyur side, no internals@ issue. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 5.3 == PHP 6?
Hi, On Fri, 2008-04-11 at 16:07 -0400, (Wietse Venema) wrote: According statistics at nexen.net, PHP4 is now 68% of the installed base (8 years of deployment) and PHP5 is 32% (almost 4 years). The lesson I draw from this is that a major release every couple years would heavily fragment the installed base, and complicate support. The problem with these stats is that they count the public available installation base into account. There are many systems which simply run without any change to anything you will find lots of outdated software there. I have other stats about systems used when installing some piece of software and there PHP 5 is 60% which is a completely different picture. So in summary: Statistics are nice, but not everything. For fans of random statistics: http://phpmyfaq.de/stats/svg/php_versions_minor_20080409230429.svg is the chart for installations of the phpMyFAQ package since 2008/01/01. (Counting only users who accepted sending their system information) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Welcome GSoC students!
Hi, Google just announced the final assignments for their Summer of Code program for this year. On behalf of the PHP project I'd like to welcome our students and give you some general information about the project. The following projects have been accepted for the PHP project: Zend LLVM Extension by Joonas Govenius, mentored by Nuno Lopes PHP Optimizer by Samuel Graham Kelly IV, mentored by Derick Rethans PhD Improvements and Updates by Nicholas Sloan, mentored by Hannes Magnusson Replace auto* with CMake by Alejandro Leiva Rojas, mentored by Pierre A. Joye gsoc:2008 - XDebug by Chung-Yang Lee, mentored by David Coallier Rewrite the run-tests.php script by Cesar Montedonico, mentored by Travis Swicegood PHP Bindings for Cairo by Akshat Gupta, mentored by Anant Narayanan Algorithm Optimizations by Michal Dziemianko, mentored by Scott MacVicar PECL, Website Improvements by Barry Carlyon, mentored by Helgi Þormar Þorbjörnsson Implement Unicode into PHP 6 by Henrique do Nascimento Angelo, mentored by Scott MacVicar See http://code.google.com/soc/2008/php/about.html for details about these projects. Important Mailing lists: php.net mailing lists are open discussion lists which can be subscribed by anyone and collected in public archives. Main language is English, as most people on these lists aren't native speakers don't be ashamed of writing bad English - I guess there are mistakes in this mail, too. For subscribing send an empty mail to the mentioned address and follow the instructions given in an automatic response. The complete rules can be found on internals This list is For everybody working on the PHP core or it's run-time, all decisions about PHP's core should be made there the list is also open for questions about PHP internals. Please mind that this list is, most likely, the most read one of these I mention here so please think before spaming it ;-) address: internals@lists.php.net subscription: [EMAIL PROTECTED] pecl-devThis list is for discussions about extensions for PHP or the PECL website. address: [EMAIL PROTECTED] subscription: [EMAIL PROTECTED] doc Everything related to documentation, talking about the documentation build system (PhD) and documenting new features. address: [EMAIL PROTECTED] subscription: [EMAIL PROTECTED] Depending on your project there might be other lists, please talk to your mentor for getting details. General rules on mailing lists: When writing to a mailing list please mind that you're writing to a whole bunch of people from different cultures with different background so try to be polite and clear about what you are saying - and don't feel insulted if you get impolite answers - we're all humans and make mistakes! When answering to mails please avoid top posting but cite the parts you're responding to and answer below them. See http://www.netmeister.org/news/learn2quote.html When starting a new thread please don't response to another mail but start a new mail, else it will be sorted to the wrong place with mail clients. Please write plain text mails, not HTML mails. The php.net mailing lists don't set the Reply-To Header (on purpose) please remember to use your mail client's Reply to All button when answering to the list, use Reply for sending a private reply. Chats: Chats are an important way for communication, it's a place to get questions answered fast, at least sometimes. As most PHP developers are either from Europe or the states the most traffic in general is there from European noon till late evening or during American daytime. There are no official channels but #php.pecl on EFNet is a place with many developers hanging out. Please mind that IRC is no place for decisions. Decisions should, in general, be made on the list else you only get responses from people who are randomly around. An introduction about IRC can be found on http://www.irchelp.org/irchelp/irctutorial.html Please ask your mentor for further advice for your specific project. Code management: The PHP project uses CVS for tracking it's code. For using php.net's CVS server please check http://php.net/anoncvs.php For getting write access on a repository you can request an account on http://php.net/cvs-php.php - before doing that please check with your mentor to define what kind of access you need for your specific project. Coding styles: For code written in the C programming language please mind our general standards: http://php.net/reST/php-src/CODING_STANDARDS Projects written in PHP should follow the PEAR Coding Standards:
Re: [PHP-DEV] Re: Building PHP. Clean builds. Noisy redefines.
On Tue, 2008-04-22 at 13:57 +0200, Hannes Magnusson wrote: On Tue, Apr 22, 2008 at 1:53 PM, Elizabeth M Smith [EMAIL PROTECTED] wrote: Hmmm - I don't get the first set of long to short warnings - what compiler/sdk are you using? Second set of (highly annoying) warnings is due to a file in TSRM - in readdir.h - and I'd love to have fixed but there is a very small set of people with karma there and even fewer who care about windows compiler warnings. ...but many read patches sent to internals@ (especially people with karma) and could commit them after reviewing :) And a few might even grant karma after they saw a few good patches for that area... johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Welcome GSoC students!
On Tue, 2008-04-22 at 14:23 -0400, Daniel Brown wrote: Of interesting note: the list rejected my earlier (second) reply to your message, Johannes. It claimed the Google BlogSpot URL was a SPAMMY URL. looks like the same happened to my mail - while I didn't get any response :-) For all: We published around 16 ideas on the wiki (didn't count them) but we were open for other ideas, too. We got quite a few proposals with some favorite ideas, I'm not sure what Google thinks about publishing detailed numbers and stuff - some overall statistics can be found in Google's OpenSource blog: google-opensource dot blogspot dot com Maybe it works now :-) (and didn't I always say that Google was evil?) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?
Hi George, On Tue, 2008-04-08 at 10:12 -0400, George Wang wrote: Either a symlink or moving the directory physically to where other SAPI code are should work. I can check in the code to a different location if need. Please let me know if anything I can help. :-) Derick just copied it on the CVS server to php-src/sapi/litespeed and gave you karma, please make a checkout of the PHP tree and test if all works, then do a cvs rm on the old files in PECL so that's cleaned. Thanks, johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Unresolved external symbol __mysqlnd_debug
Hi, On Tue, 2008-04-22 at 22:56 -0400, Edward Z. Yang wrote: I'm getting this fatal error compiling mysqli under Windows: Creating library Release\php_mysqli.lib and object Release\php_mysqli.exp mysqli_api.obj : error LNK2019: unresolved external symbol __mysqlnd_debug referenced in function _zif_mysqli_debug Release\php_mysqli.dll : fatal error LNK1120: 1 unresolved externals A similar error is occuring in the snapshot builds at snaps.php.net. Where can I get a more recent version of the library files? (if that is the problem?) mysqlnd is part of PHP so it had to be fixed in PHP, I've just committed a fix and my windows build seemed to work. Please do a cvs up and try again, thanks, johannes -- Johannes Schlüter, Software Engineer MySQL GmbH, Dachauer Str.37, D- 80335 München, www.mysql.com Geschäftsführer: Kaj Arnö - HRB München 162140 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Calling a class constructor
On Fri, 2008-05-02 at 12:03 +0200, Marcus Boerger wrote: Hello Antony, Johannes, seeing this thread I agree. So that makes the list: PCRE, Reflection, SPL. Johannes? I was under the impression that was already the case for Reflection, so I don't mind. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [HEADS UP] pecl/phar is now ext/phar
Hi, On Mon, 2008-05-12 at 16:45 -0500, Gregory Beaver wrote: It's time for helly's birthday present from me (and indirectly, Derick, who did the cp -r) :). As Johannes requested, pecl/phar has been copied to php-src/ext/phar, Great work! :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [HEADS UP] pecl/phar is now ext/phar
On Tue, 2008-05-13 at 14:41 +0100, Steph Fox wrote: Sorry Hannes, should've kept it on-list. The clue was in Tony's mail, I'm just testing a fix now. Access denied, insufficient karma. Fix is in PECL CVS, what do I do now? Mail in a patch against 5_3? You should try again, karma should be there, now. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: unicode.semantics ad infinitum
Steph, On Wed, 2008-05-14 at 13:59 +0100, Steph Fox wrote: I wrote a macro to allow us to use the same code for the extension in both branches, but it occurs to me that the zstr union definition might change or even disappear when PHP 6 becomes Unicode-only. Is that likely? I don't know. So keeping it all together is total guesswork at present. In general: No. We still need both string types at most places, the effect of the u.s setting is the default type for strings in the engine. Most other functions still need to work with both kinds of string as parameter and such. (strlen(bäöü) vs. atrlen(uäöü)) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Proposal for a PHP-BASED Make facility
Hi, On Thu, 2008-05-15 at 00:49 -0400, Hector Santos wrote: - All that is needed with a source distribution or as a separate distribution, is a PHPMAKE package that might include a root folder: phpmake/bin minimum php binaries for the platform i.e, php.exe, php5ts.dll for windows That's a hen and egg problem then - one would need PHP to build PHP and we don't have the infrastructure to provide binaries for all the platforms we support (there's more than Linux and Windows) And then you have to do quite some work others already did for finding system difference - and keep the systems database and/or checks up to date - that's far from our scope. Please read about what the autotools, cmake and others are doing. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Proposal for a PHP-BASED Make facility
Hi, On Thu, 2008-05-15 at 04:21 -0400, Hector Santos wrote: On Thu, 2008-05-15 at 00:49 -0400, Hector Santos wrote: - All that is needed with a source distribution or as a separate distribution, is a PHPMAKE package that might include a root folder: phpmake/bin minimum php binaries for the platform i.e, php.exe, php5ts.dll for windows That's a hen and egg problem then - one would need PHP to build PHP and we don't have the infrastructure to provide binaries for all the platforms we support (there's more than Linux and Windows) That's what I thought too, but you still still have the same (chicken/egg) issues of PHP being dependent on what OS the AutoTools/CMake facility works on. The basic requirement of being able to port the minimal set of PHP files for an OS would still need to required in either case. If the porting is simpler for autotools/cmake than raw PHP, then I can see that as a plus. Well the difference ist: For an own build system _we_ do to have it our own and verify it on each platform, autotools/cmake are used by lots of other projects with many many more contributors which keeps the things running. Additional most OS packagers add these tool to their packages themselves as they are essentially for compiling basically anything. Without autotools you can't compile many stuff PHP depends on on the platform so the autotools have to be ported anyways before PHP can be build there Personally, as a side note, I think PHP makes should be separated (each using a common/structure methodology for PHP). I'm still catching up, but there seems to to be a tremendous amount of complexity when trying to auto configure and build it all as one big make. For example, it would be ideal, IMO, if I can do: domake MYEXTENSION domake PDO domake MYSQL domake PHP5TS_DLL domake OFFICIAL_RELEASE_MODULES_ONLY domake ALL build extensions shared (--with-foo=shared) then you can do make $target where target might be modules/$extension.so so it's all there and works in a way everybody used to the autotools way of doing things can understand witrhout reading any documentation. An own system would need lot's of documentation so Joe Admin can compile it the way he wants it. and not worry about all the erroneous errors and warnings you might get with its attempt to build other parts that you don't need to rebuild. make only compiles the things it has to compile for building the specified target, if your target is all (which is the default) it compiles the php executables and all modules requested (if sources have changed after the last build). In the end: our build system works (mostly) and I doubt a PHP based system can fix the remaining issues in a sane way, especially not without making it more complex. Every *nix admin knows how to use autotools, no admin knows about PHP and a PHP-specific build system and that's the main target group for a build system. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Short syntax for array literals [...]
Hi, On Thu, 2008-05-22 at 12:33 +0200, Pierre Joye wrote: Agreed, we should simply go through a vote and be done with that. Vote until all are annoyed and don't vote against it anymore just to stop voting? (it's less annoying to have it than vote about it every two months) There was some voting about this feature quite recently, don't have the archive link at hand. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Unicode progress [Was: unicode.semantics ad infinitum]
Hi, On Sat, 2008-05-24 at 13:55 +0100, Steph Fox wrote: Warning: crc32() expects parameter 1 to be strictly a binary string, Unicode string given in ... Surely if a function's *expecting* a binary string it should do a silent conversion, and only throw a warning if the conversion fails? I don't see why the onus should always be on the user to adapt to this. For some functions taking binary strings is critical for working nicely with an automatic conversion in this case crc32(uäöü) and crc32(bäöü) would give completely different results depending on the runtime encoding, relying on a implicit conversion there is most likely a bug (at least for apps written with PHP 6 in mind). Oh and I might probably also argue that crc32(uäöü) should give the crc32 of the internal representation (utf-16...) of the string, which is a total wtf for the user then. The correct solution is to make safe use of the S modifier and not using it too much. As binary casts are allowed in modern PHP versions I don't see this as an issue, while such a cast isn't absolutely the best thing to do: I'd go with unicode_encode() to be sure about the encoding being used, everything else is prone to fail some time (some code changing unicode.runtime_encoding for some random reason...) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Unicode progress [Was: unicode.semantics adinfinitum]
Steph, On Sat, 2008-05-24 at 20:37 +0100, Steph Fox wrote: Heya Johannes, For some functions taking binary strings is critical for working nicely with an automatic conversion in this case crc32(uäöü) and crc32(bäöü) would give completely different results depending on the runtime encoding, Yes - but why should the user have to do the casting? Why can't the function itself cast to binary when it has an 'S' modifier? Like, during zend_parse_parameters() for example? Whatever happened to keeping PHP simple? Since only the users knows the correct encoding. The function might fallback to unicode.runtime_encoding which can be wrong. And it's hard to track the reason. relying on a implicit conversion there is most likely a bug (at least for apps written with PHP 6 in mind). Oh and I might probably also argue that crc32(uäöü) should give the crc32 of the internal representation (utf-16...) of the string, which is a total wtf for the user then. Nobody's asking to be able to cast it to unicode. I'm asking whether it's entirely necessary to force users to cast to binary all over the place, and a strict binary parameter spec looks like being one place where the cast could be done internally. In this case there's no cast but the most simple implementation of crc32() on a unicode string. The correct solution is to make safe use of the S modifier and not using it too much. As binary casts are allowed in modern PHP versions I don't see this as an issue, while such a cast isn't absolutely the best thing to do: I'd go with unicode_encode() to be sure about the encoding being used, everything else is prone to fail some time (some code changing unicode.runtime_encoding for some random reason...) You're telling me an explicit cast to binary could fail internally but not externally? That doesn't make a lot of sense somehow. Externally the user is responsible to select the proper encoding internally PHP has to guess. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Short syntax for array literals [...]
On Wed, 2008-05-28 at 09:19 +0200, Derick Rethans wrote: Right, and I will add immediately to my coding standard that this is forbidden to use. ... which doesn't help people having to read code without being able to influence the coding style... johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Algorithm Optimizations - string search
Hi, On Wed, 2008-06-11 at 01:01 -0700, Texin, Tex wrote: When I looked at the code, I assumed that it wasn't intended for international use I'll have to go back and look to give you details, but it doesn't work for international use or unicode. It would be ok for 8859-1. That's the default case in PHP 6, in current PHP versions all string operations use on binary strings, so all references to offset work on byte not character base. That's one of the main reasons for PHP 6. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: Fw: [PHP-DEV] Dummy calls for 5.3.0 up? [Was: HEAD tests broken under Windows]
Hi, On Thu, 2008-06-12 at 10:53 +0100, Steph Fox wrote: There is far too much of this kind of thing. Can we please consider adding dummies into at least 5.3.0 and possibly even the 5_2 branch for: is_binary() is_unicode() These can be easily emulated using PHP like if (!function_exists(is_binary)) { function is_binary($s) { return is_string($s); } } file_put_contents(FILE_BINARY) Would a const FILE_BINARY = 0; be enough or would that break the function in some way (didn't check it) and any other major 'gotchas' that people can think of that will make it impossible to write future-compatible PHP 5 code? as long as such an emulation is possible I'd prefer putting them in a compatibility layer (like PEAR PHP_Compat) using PHP instead of putting useless (mind the quotes ...) functions into PHP. Stuff like the b prefix or (binary) casts are different as they can't be emulated using userland stuff. johannes Thanks, - Steph - Original Message - From: Steph Fox [EMAIL PROTECTED] To: internals internals@lists.php.net Sent: Thursday, June 12, 2008 3:32 AM Subject: [PHP-DEV] HEAD tests broken under Windows Hi all, I'm hopeful that run-tests.php will now work as advertised under CVS HEAD in most places. However it's still not right under Windows, and I finally tracked that down to the fact that file_put_contents() in PHP 6 will insist on creating a file with DOS line endings. The test files are created from .phpt --FILE-- sections using file_put_contents(), so there are a vast number of fails under doze due to an extra character in output strings there. There's a *closed* PHP bug on this which was raised by Zoe over a year ago, see http://bugs.php.net/bug.php?id=41609. For some obscure reason it was seen as a documentation problem at the time. This is an extreme change in behaviour, not a documentation problem, and needs proper analysis. Could someone please look into it? Thanks, - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] extensions status, to move to pecl or to drop
Hi, On Thu, 2008-06-12 at 16:31 +0200, Pierre Joye wrote: * Extension being deleted (not removed, a cvs rm will be done) mhash, no impact as we provide a compatibility layer via ext/hash (Thanks to Scott) We should keep this somewhere in Siberia like we did with other extensions we removed. (PHP 4 XML stuff for instance) * Extension looking for love (if noone raises the hand, they will end in PECL too) - ncurses I can help here for the windows port and pdcurses support on unix and windows. Hartmurt agreed for the move it to pecl for 5.3. hm, I thought this was already done, go for it. - smnp nice ext, any ISP out there willing to help? I can help for the windows support Last time I checked it worked nicely and I know other user which have no problems either, so I guess there's not much maintenance needed. The only thing I see is implementing new parameter parsing API. So I don't see a reason to move it to PECL. Can be moved PECL - interbase - fpdf - fbsql - sybase and sybase_ct Moving fpdf shouldn't be a problem, for the others I can't really judge, I don't know a user of these, but that's me. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] towards a 5.3 release
On Wed, 2008-07-02 at 22:24 +0200, Hannes Magnusson wrote: On Wed, Jul 2, 2008 at 22:00, Lukas Kahwe Smith [EMAIL PROTECTED] wrote: @Philipp: Since you are the god of documentation .. How are things looking on the scratchpad [8] you started? Philip, one p, recently moved to Nicaragua (last weekend actually) and isn't really available these days :) Nice :-) Furthermore I haven't seen Nuno for a while and you guys stole Felipe from us and I recently found out that school is heckofalot easier than work :] So... any and all help in the documentation area would be appreciated. The scratchpad wiki page is a good start, but I doubt these are the only changes/new features in 5.3... Of the top of my head; a list of error changes (especially functions/features now throwing E_DEPRECATED) is missing... Also the changes to zend_parse_prameters() should be checked for tiny changes (like the current()/next() changes already documented on that wiki page) Help from any lurker here is appreciated! johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Namespaces for internal classes
On Fri, 2008-07-04 at 10:28 +0200, Lars Strojny wrote: Hi Derick, Am Freitag, den 04.07.2008, 10:14 +0200 schrieb Derick Rethans: I'd say this is a BIG no-no. PHP owns the top-level namespace. Why make things harder? And on top of that, you're suggesting just to break code for no good reason in Backwards compatibility and other constraints. Quoting the proposal: The current names are available as deprecated aliases until their removal. This means that until we decide to remove the old names, the current ones are available. I'm currently investigating how to implement an ADD_DEPRECATED_CLASS_ALIAS-macro. Classes/interfaces created with this warning would trigger an E_DEPRECATED warning. That's not entirely true, there are minor BC breaks: Let's say Bar is an alias for Foo::Bar. now to $r = new ReflectionClass('Bar'); echo $r-getName(); and you'll get 'Foo::Bar' as that's the name in the CE, same goes for error messages, stack traces, ... (I'Ve seen people parsing them...) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Closures: updated proposal and patch
Hi, On Thu, 2008-07-03 at 22:30 +0400, Dmitry Stogov wrote: I don't see big problems with closures. The patch is simple and stable. It's main part isolated in zend_closures.c and it doesn't affect other parts of engine. Changes too the languages always introduce some side effects and therefore we have too be careful there. Even stuff which is from engine point of view nice might have some effects on the userland which might not be too nice, just see the ongoing discussions about details about namespaces... But back to closures: I spent the last weeks with less mail reading and am still 112 mails on internals behind so maybe I missed something there but even short tests showed me things which might need cleanup: A tiny thing I saw is different naming in different places: php -r 'is_callable((function () {}), true, $name); var_dump($name);' string(6) lambda vs. php -r 'var_dump(function(){});' object(Closure)#1 (0) { } Do we really want to use both names in userland? Is a string lamda really the best represantation for callable_name? (this might even be an issue if somwbody has a function called lambda ... for whatever reason, oh just checked people even do: http://google.com/codesearch?hl=enlr=q=lang%3Aphp+%22Function+lambda(% 22sbtn=Search ) Another issue I found during my short testing period today is reflection: In a previous position I had to deal with callbacks, for making the code more robust I checked the callback using reflection before accepting it, the code looks something like that: function setCallback($cb) { if (is_array($cb) { $r = new ReflectionMethod($cb); } elseif (is_String($cb)) { $r = new ReflectionFunction($cb); } else { throw new Exception(); } if ($r-getNumberOfRequiredParameters() != 2) { throw new Exception(); } /* ... morre checks of that kind ... */ } Now such a check isn't possible, all reflection information on the callback I can get is that it is an object of type Closure having a method __invoke() with zero required parameters. There's no further information on the function, so probably we need a ReflectionClosure class or something Both of them are tiny issues which can be fixed in a quite simple way (or be documented as expected) but my concern is that we'll find way more of them. So the final question is: Do we want to go in a higher pace to get things out and have other features ready which can be added early for a new release cycle or do we want to go a bit slower with the risk of stopping and probably going backwards, again. I'd prefer the first way (even so I do really like closures and wanted to have them for some lng time...) I expect more problems with GC GC can be problematic yes, but imo gc can either be disabled by default and documented as use only with care for running your unit test suite or completely dropped, even in a later stage if there are problems, I don't see there much potential for long going detail discussions. Even if it's, technically, more critical. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Closures: updated proposal and patch
On Fri, 2008-07-04 at 11:31 +0200, Lars Strojny wrote: Hi Johannes, Am Freitag, den 04.07.2008, 11:18 +0200 schrieb Johannes Schlüter: Now such a check isn't possible, all reflection information on the callback I can get is that it is an object of type Closure having a method __invoke() with zero required parameters. There's no further information on the function, so probably we need a ReflectionClosure class or something Couldn't ReflectionFunction play that role. Classes and instances with a defined __invoke method can be reflected with ReflectionFunction? At the moment: not enough. $ php -r 'echo new ReflectionObject(function ($a, $b) use ($c) {});' Object of class [ internal final class Closure ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Dynamic properties [0] { } - Methods [1] { Method [ internal public method __invoke ] { } } } it's not mentioning the parameters or the used variable, and yes, it's a tiny issue which can, most likely, fixed within an hour or so but I guess we'll have many more of that kind: Tiny issues which end up in discussions about taste (should we add a new class or simply add special treatment in ReflectionMethod for Closure::__invoke?) and all this stuff can delay things... That's the risk I'm seeing. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [RFC] Namespaces for internal classes
Hi, On Fri, 2008-07-04 at 11:26 +0200, Lars Strojny wrote: Am Freitag, den 04.07.2008, 11:15 +0200 schrieb Johannes Schlüter: [...] That's not entirely true, there are minor BC breaks: Let's say Bar is an alias for Foo::Bar. now to $r = new ReflectionClass('Bar'); echo $r-getName(); and you'll get 'Foo::Bar' as that's the name in the CE, same goes for error messages, stack traces, ... (I'Ve seen people parsing them...) Didn't thought of that, thanks for the heads up. In your opinion, would that be a show stopper? Depends ;-) Main point: There's no such thing as no BC break. So we have to decide whether that BC break (hoping it's the only one) is less a problem than having an inconsistent naming scheme. (... wait - isn't PHP famous for being inconsistent?) The question there is: Where do we want to go tomorrow? Do we want to namespace internal stuff? All of it? Or do we still want to own the global namespace and put internal classes there? As long as that isn't decided it's hard to make a decision about aliasing. So I'd say we need the RFC which defines rules for future stuff (All/non-core parts/nothing in namespaces) and then the consequences for existing stuff. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] win32 snaps back
Hi, On Sat, 2008-07-05 at 18:33 +0200, Pierre Joye wrote: The win32 snaps were broken since the 24th of June. Except the 5.3 apache2filter and the 5.3 installer snapshots, everything is back online. Thanks for that, while working on the Windows stuff: Do you think you can find a good way to send notices to the list or at least me (and Lukas) once the build fails. In past we had enough situations where snaps were broken for a few days without anybody seeing which makes finding the cause harder... When doing that please keep in mind not to spam the list too much so only send a mail out when it fails for the first time, not every two hours when the snaps box tries again. Thanks, johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] New string functions: str_startswith() and str_endswith()
On Mon, 2008-07-21 at 22:06 +0200, Paweł Stradomski wrote: W liście Rasmus Lerdorf z dnia poniedziałek, 21 lipca 2008: It also isn't any shorter: if(str_endswith($path,'.php')) vs. if(substr($path,-4)=='.php') Only if comparing to a static string, but not for this case: if (substr($path, -strlen($extension)) == $extension) Then $extension is a CV which isn't that much slower in comparison as a CONST, so from engine-performance-perspective: no big deal - spend your time optimizing on other places where it has more effect than the time you loose on teaching people about all the fancy string functions (where we already have more than enough) Readability would also increase. too many functions hurt more on readability imo ... johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Volunteers for Subversion 1.5 conversion of cvs.php.net?
On Thu, 2008-07-24 at 20:25 -0400, Gwynne Raskind wrote: Yes, I read that. But the conversion of the repository itself is only half the battle. There are a bunch of scripts in CVSROOT that need to be ported over to SVN somehow. My plan was to work on those next. not only CVSROOT, there are also some vcs-specific script in php-src (like cvsclean or scripts for snaps building), scripts on the snaps box to build snaps, on master to generate docs and websites, which all have to found, analyzed, rewritten. So a rather long running project where he repository conversion is one of the smallest problem (enough big projects did that so if there are problems there are many places to ask, whereas the whole infrastructure around has to be analyzed...) :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] CVS to SVN Migration
On Fri, 2008-07-25 at 10:26 +0200, David Soria Parra wrote: However I think we should provide the infrastructure for developers to setup a dvcs. I dont know if we want to standardize on a specific one. But collaboration on exterimental stuff that requires a dvcs should be possible on php.net servers. Maybe it's just about having the possibilities for developers to share experimental trees on a php.net side so that people from outside can pull from it easily and not to remember a bunch of urls to get the trees of some developers working on interesting patchsets. Sharing trees can also be done with svn. A repository structure might look something like that: root + active master tees | + trunk | + php 5.3 | \ ... + developer trees | + johannes | | \ my private play ground | \ \ archive + php 5.2 + php 5.1 \ svn 1.5 should allow merging between these tree's, but all such things should be discussed on the other, new list :-) johannes P.S. I'm a git fan boy but see good reasons against it for PHP -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] towards 5.3 alpha1
Hello all, As some of you may have noticed the 5.3 todo list [1] has been reworked a bit. There is now a list for alpha1 and some more items for alpha2. As previously announced Lukas and I are allowing low risk self contained work to continue until alpha2 on a case by case basis. However there are even still a few items that did not make it in for the alpha1 feature freeze that we have permitted to be worked on over the course of this weekend. Or just general bug fixing items we need to have done before alpha1 release (planned for July 31st): 1) various string optimization patches from Matt (Scott) 2) various ZE optimization patches from Matt (Dmitry) 3) add tests for fileinfo (note fileinfo is now bundled and enabled by default just as mimemagic was before PHP 5.2) (Derick) 4) add openssl_parse_csr (Pierre) 5) OpenLDAP C API cleanup patch and pat44 LDAP control support (Pierre) 6) Zend Signal Handling (Dmitry) 7) add array_replace[_recursive] (diff, phpt) (Johannes) 8) prepare windows build infrastructure (Pierre, Rob, Liz) 9) make parent::/self:: forwarding (Dmitry) 10) make ming compile with libming 0.3 and up (Frank) 11) unix path separators in spl (Marcus) 12) add Christians Reflection patch for closures (Marcus) @Marcus: Can you handle 11) and 12)? Let us know if we are missing anything from this list ASAP! Then a couple questions that need to be answered and quickly resolved: - undeprecate ticks: as long as we have no replacement for the signal handling we shouldn't deprecate the only way to do that. - drop __toString() from Closures - Do not include 3xx http codes in the fopen wrapper Again a general request to the developer and user community at large: Please concentrate on findingfixing bugs instead of functional changes (including arginfo and parameter_parsing) and to make sure we have all changes covered in the wiki [2] so they can be added to release notes and the documentation. Lukas and Johannes [1] http://wiki.php.net/todo/php53 [2] http://wiki.php.net/doc/scratchpad/upgrade/53 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] DOMDocument Extension: Output current nodelist
On Wed, 2008-07-30 at 00:23 +0200, Benjamin Eberlei wrote: I recognized at work today that DOMDocument has two function saveHTML and saveHTMLFile, but only a save function for the unfiltered xml node structure to save to a file although libxml provides the functionality to export the data to string. There's save() and saveXML(), where the later does what you're looking for. I created a patch that adds a new method DOMDocument::ouput that does Why output? ooutput would mean it prints directly to the output stream. Two comments to the patch: (although the function already exists..) Please use diff -u in future, probably even diff -up, that makes the diff way better to read (see http://php.net/anoncvs.php for tips about configuring cvs to do that automatically) And please use braces { } on if statements. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Making PHP upload hooks available through session variables?
Hi, On Wed, 2008-07-30 at 13:46 -0700, Tore B. Krudtaa wrote: As most of you probably know Rasmus Lerdorf made som upload hooks available in PHP 5.2 some long time back. This was great news for those that wanted more control of uploads and/or wanted to give real time feedback to client about upload progress, and had APC installed as well. Most PHP installations does not have APC installed, so therefore the upload hooks are not available. I would like to be able to use the upload hooks without installing the APC. There's also a package called uploadprogress or something like that in PECL. I would eventually like to be able to use those upload hooks using session variables. I think that's not possible in a good way as the uploading process would have to open and parse the session file, update the status, serialize it and store it again to disk everytime the status changes (aka. every few bytes received), APC does that using shared memory, uploadprogress using special files in /tmp, I think. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]
Matt, On Tue, 2008-07-22 at 10:52 -0500, Matt Wilmas wrote: Adding these two array functions has been on the TODO for a while, The patch can quite easily be tricked into an endless recursion of php_array_replace_recursive() calls which will segfault: $ php -r '$a = array(); $a[] = $a; $b = array(); $b[] = $b; array_replace_recursive($a, $b);' Segmentation fault Some other cases were covered by PHP's recursion detection: $ php -r '$a = array(); $a[1] = $a; $b = array(); $b[2] = $b; array_replace_recursive($a, $b, array($a, $b), array($b, $a));' Warning: array_replace_recursive(): recursion detected in Command line code on line 1 Can you try to add a detection for the first case? johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]
Hi, On Thu, 2008-07-31 at 11:48 -0500, Matt Wilmas wrote: Ugh, I hate that reference/recursion stuff! I have a hard time following what's happening, and am not sure how some of those checks, etc. even work in php_array_merge() (which I was working from). :-/ I tried changing a few parts, and unfortunately couldn't fix it. I will look at it further when I have some more time, and will of course let you know if it's fixed. Sorry. :-( I think I found a think: you're iterating over src and src_entry, but doing the recursion check using Z_ARRVAL_PP(dest_entry)-nApplyCount, I didn't test it (need food first) but should do that with src_entry. That's at least where I'd poke around, can you try that, else I'll dig around there, after having some food :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] New functions: array_replace[_recursive]
Matt, On Thu, 2008-07-31 at 20:06 +0200, Johannes Schlüter wrote: On Thu, 2008-07-31 at 11:48 -0500, Matt Wilmas wrote: Ugh, I hate that reference/recursion stuff! I have a hard time following what's happening, and am not sure how some of those checks, etc. even work in php_array_merge() (which I was working from). :-/ I tried changing a few parts, and unfortunately couldn't fix it. I will look at it further when I have some more time, and will of course let you know if it's fixed. Sorry. :-( I think I found a thing: you're iterating over src and src_entry, but doing the recursion check using Z_ARRVAL_PP(dest_entry)-nApplyCount, I didn't test it (need food first) but should do that with src_entry. FYI: that assumption seems to be correct and I committed it including the fix :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/date config.w32 /ext/date/lib parse_iso_intervals.re
Hi, On Sun, 2008-08-03 at 22:15 +0200, Pierre Joye wrote: Hi Derick, On Sun, Aug 3, 2008 at 6:34 PM, Derick Rethans [EMAIL PROTECTED] wrote: you're not reading what I said. It does not make one single bit of sense that a short function gives problems while an enormously long function is fine. This does *NOT* make sense. If you have no idea either, then figure it out first before you add silly #pragmas to code. This code broke the VC6 build, that's a fact. A breakage must be fixed, period. I figured out why and fixed it, end of the topic. Let forget the insane amount of warnings in the date code... (top #1 in PHP). Correct PHP is supposed to work on all platforms therefore the code has to work on Windows, too. Now there are two questions Derick ask, which I see as valid questions: a) Why does it break with that function while at least another bigger one exists. Do we have to expect the other one breaks too the next time the scan() function is regenerated from re2c for instance? It feels a bit awkward that a small function is too big for the compiler while a way bigger one isn't. So finding the exact reason might help in the future. That's mainly curiosity. b) In general the build system is not only for putting the stuff in the compiler but also detecting compiler problems and working around them. Is it possible to do this work around in the build file? The benefit would be that it's less likely that a developer breaks it by accident and we avoid making our code harder to maintain by not cluttering it with compiler specific stuff (probably the Aix compiler has a problem with some other stuff, the Sun compiler with other stuff and yet another compiler somewhere else) Yes one workaround doesn't hurt but let's wait 5, 6, 7 years of further growth of the code base and new compilers with their issues to be supported... Therefore such changes should be, when possible, be placed in the build files. Oh and also see the discussion about a gcc issue we recently discussed on the list. So as a summary: The nicest code is worthless if we can't compile it on our platforms, but build fixes should be places where they hurt the less. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Closures and reflection improvements
Christian, On Mon, 2008-08-04 at 11:33 +0400, Dmitry Stogov wrote: http://www.christian-seiler.de/temp/php/2008-07-24-reflection/reflection-closure-fixes-5.3.patch http://www.christian-seiler.de/temp/php/2008-07-24-reflection/reflection-closure-fixes-6.patch without applying and testing the patch: - zend_hash_apply_with_arguments(ce-function_table TSRMLS_CC, (apply_func_args_t) _addmethod, 3, ce, return_value, filter); + zend_hash_apply_with_arguments(ce-function_table TSRMLS_CC, (apply_func_args_t) _addmethod, 3, ce, return_value, filter, intern-obj); that looks a bit strange, probably you want 4 instead of 3 now? johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Alias stream_context_get_default() as stream_context_set_default()
On Mon, 2008-08-04 at 09:49 +0200, Hannes Magnusson wrote: On Mon, Aug 4, 2008 at 01:29, Davey Shafik [EMAIL PROTECTED] wrote: Hey, it has come to my attention that stream_context_get_default() is /grossly/ misnamed, considering [...] That doesn't really solve anything as the argument is optional. Adding a new function which enforces the parameter sounds way better then a simple alias. In fact, to me it reads like the default context would be reset to nothing. I hope not ... I'd expect it to return the current default context unchanged, else that function certainly should be replaced johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] enabling everything by default
On Fri, 2008-08-01 at 14:11 +0400, Antony Dovgal wrote: I mean completely no offense to the developers of these extensions, but I would like them (extensions) to be thoroughly tested and mature first, after that we can discuss the question of adding them to the core. I think alpha stage is a time where they can be tested and depending on feedback we can decide how to proceed. I assume most people do a configure and pick their favorite extensions and it's all they test. By enabling we at least compile-test and run-tests.php-test them on multiple platforms. In general I lean towards the why bundle it if it's not enabled side. But this is a good discussion and probably I change my opinion on that. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php-src /ext/date config.w32 /ext/date/lib parse_iso_intervals.re
Hi, (should have gone out yesterday, but was hanging in my outbox...) On Mon, 2008-08-04 at 15:11 +0200, Pierre Joye wrote: Correct PHP is supposed to work on all platforms therefore the code has to work on Windows, too. And now it does. Which is a good thing. Now there are two questions Derick ask, which I see as valid questions: a) Why does it break with that function while at least another bigger one exists. http://msdn.microsoft.com/en-us/library/1dy6t14d(VS.80).aspx There is three possible causes. There are three different work-arounds. It would be good to know the exact reason maybe re2c generates bad code and can be optimized or something, since by itself, from scrolling over the generated file the warning doesn't make too much sense to me and I'd like to have this fixed before other scanners (zend_language_scanner for instance) show the same problem. Do you suggest that disabling the optimization for the whole date extension will heart less than 4 lines in the src code? Simple question yes/no is enough for me: Can it be done, using the build system, in a per-file way or only per extension? (If yes per-file, I'd prefer that way, else: keep the #ifdef) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] How does error_log open the file?
On Mon, 2008-08-04 at 00:52 -0700, mike wrote: I'm curious as to how error_log is opened... Is it opened when an error occurs, as in open/append to, or is the file handle kept open when the PHP fastcgi process is spawned? Depends on configuration in php.ini and some special extensions loaded. Default is to use the sapi's logging mechanism, for example when using the apache module apache writes it to it'S error log in whatever way Apache does that (I think open on server start and then write..) Else it either uses the syslog or open the error file for every message and writing itself... But all of that can be overwritten by extension (Xdebug for isntance overwrites the error handling, others do, too) johannes P.S. Have some patience when asking question to this list... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] clearstatcache change
On Wed, 2008-08-06 at 21:00 +0200, Arnaud Le Blanc wrote: btw. I just noticed chroot() calls this realpath_cache_clean()..intentional? I'd assume that, as /foo inside a chroot is different from /foo outside... Also some streams stuff uses the php_clear_stat_cache() func but those should propably use the realpatch_cache_del() instead and not blow away whole cache? Yes, I think too. I added that to your patch: http://arnaud.lb.s3.amazonaws.com/clearstatcache_optional_params.patch :) It also adds the filename argument to clearstatcache([bool clear_realpath_cache[, filename]]) I reply to myself, actually this may cause troubles to not clear the full cache in plain_wrapper.c :/ I updated the patch, just left the filename argument to clearstatcache(). If you fix the arginfo like Hannes it's, good. If the name of the second parameter in the proto (filename) is the same as in the implementation (pathname) it might even be a bit better :-) johanes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: cvs: php-src /ext/pcntl EXPERIMENTAL
Hi, On Thu, 2008-08-07 at 13:07 +, Antony Dovgal wrote: tony2001 Thu Aug 7 13:07:07 2008 UTC Removed files: /php-src/ext/pcntlEXPERIMENTAL Log: remove EXPERIMENTAL flag The EXTENSIONS file says EXTENSION: pcntl MAINTENANCE: Unknown STATUS: Working Now that we're removing the EXPERIMENTAL flag: Anybody who wants to step in? johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] cleaning php-src root dir
Hi, the php-src/ dir is quite filled with outdated READMEs and TODOs, any objection to remove these files: README.PHP4-TO-PHP5-THIN-CHANGES README.QNX README.UPDATE_5_2 README.Zeus TODO TODO-5.1 TODO-PHP5 UPGRADING The TODOs seem to be quite outdated, the Upgrading guides for 5.0, 5.1 and 5.2 are part of the documentation meanwhile. 5.3 will get a new one. Related to that: ChangeLog in 5.3 is kind of awkward: It only lists changes in 2005, until HEAD became PHP 6. In HEAD it's a long file covering 2005-2008, anybody wants to clean that up :-) README.TESTING2 might need an update, run-tests2.php doesn't exist, but server-tests.php does, anybody maintining that? README.WIN32-BUILD-SYSTEM - does this require updating for the new build infrastructure? johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Apache 1.x sapi timeout name fix
Hi, is anybody with deeper Apache knowledge around who can review that? Thnaks, johannes On Fri, 2008-08-15 at 19:36 -0700, Lucas Nealan wrote: Hello, Apache 1.x SAPI will occasionally timeout with a Read POST information timeout error instead of a send timeout error as it should. This will happen if the alarm timeout occurs in a POST request, at any point after the post is read (ie. php_execute_script). This is because the hard_timeout(send) name set within send_php() is overridden by the hard_timeout(Read POST information) in sapi_apache_read_post() and never restored. I walked through the startup calls from the point where timeout is set in send_php to where the read post timeout is set. It seems highly unlikely that a timeout should happen in this code, even if it were set to 1. The patches below will correct the timeout name by moving the hard_timeout(send) from send_php() to php_apache_sapi_activate(), which is called just after the post is read. http://sizzo.org/~screen/patches/php-5.3.0-timer_post.patch http://sizzo.org/~screen/patches/php-HEAD-timer_post.patch -lucas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] CVS Account Request: cseiler
On Thu, 2008-08-21 at 01:11 +0200, Lars Strojny wrote: Am Montag, den 11.08.2008, 12:18 -0700 schrieb Christian Seiler: Maintaining closures, see http://news.php.net/php.internals/39835 What's with that? should be activated and has usual karma. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] run-tests gsoc status?
On Wed, 2008-08-27 at 10:46 +0200, Derick Rethans wrote: There was a run-tests.php rewrite application accepted for gsoc this summer.. I however haven't heard a word about it since then.. Does anyone know the status of that project? Still no reply to this? I suppose the project is then not going anywhere. Can any of the GSoC admins see if something happened with reviews here? Nothing happened there, neither student nor mentor filled out the final survey nor did I see any code. (but that's also true for projects doing quite well) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Unable to find bug in these few lines of code. Please help.
On Thu, 2008-08-28 at 16:09 +0530, KishoreKumar Bairi wrote: PHP_FUNCTION(test_func) *{* These additional asterisks (*) make the code hard to read. but when I hit http://localhost/test.php Instead of showing the string, my browser is offering *test.php* for download. If I click save, its saving a zero byte test.php to my disk. Take a look at your server's error log, it will tell you that the apache child segfaulted. Use a debugger on the apache process or avoid complexity and use PHP CLI with a debugger to find the cause. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fileinfo portability fixes, stream usages and cleanup, #1
On Mon, 2008-09-01 at 16:40 +0200, Pierre Joye wrote: hi all, Please find the patch here: http://pierre.libgd.org/patches/fileinfo_stream_cleanup.txt From scrolling over it and applying it on my Solaris box it looks fine. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP] PHP 5.3.0alpha2
On Wed, 2008-09-03 at 23:36 -0700, steve wrote: It is pretty much include() and its relatives. Autoloading with a lot of possible include paths. I'm sure if you had a Zend Framework App and put it on Windows, and took out all the require_onces with paths in them Try 5.3 please, our implementation of realpath(), one of the biggest require_once slowdowns, as well as other parts were improved quite a lot. Feedback is welcome :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ini-parsing, double quotes, windows in 5.3
Hi, now that we have a publicly available alpha on Windows we get the first feedback from Windows users. Within quite short time we got two bug reports (#45992 #45994) about a change in the ini-parsing: With =5.2 we allow include_path = c:\foo\bar\ and treat the backslash as regular character. It's documented that way in http://de.php.net/manual/en/configuration.php example #1 and in php.ini-recommended. This was caused by the changes in the ini parser which are important, but in my opinion this is a break where we should try to find a way to keep the behavior, especially as it was in the recommended php.ini file and other places before. Pierre completely disagrees, I guess he'll answer to this mail and tell why :-) Opinions from others, a good proposal to keep the improved ini handling and making this work? :-) johannes This message was sent using IMP, the Internet Messaging Program. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] allow T_INLINE_HTML before T_NAMESPACE
Hi, On Fri, 2008-09-12 at 14:11 -0500, Greg Beaver wrote: This is a simple patch that allows files like this: main.php: html [...] ?php namespace my::template; // stuff ? I'd prefer: main.php: ?php namespace foo; ? html !-- ... -- ?php //stuff ? /html looks cleaner imo. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP Suspendable requests for Apache
On Sun, 2008-09-14 at 23:21 +0200, Rustam Abdullaev wrote: Second and most important though, Apache isn't architected to handle long running processes inside a request, as it typically uses a limited pool of Not true.. Tomcat supports comet, and it runs on APR. Yes, the thread pool is small, but there is always a solution. The idea is to return the thread back to Apache's thread pool while waiting for an event: http://tomcat.apache.org/tomcat-6.0-doc/aio.html Then convince the Apache developers to implement the feature in Apache httpd... Anyway, I'm positive that its doable.. Those Java guys have it already :) ... if you find a good way: feel free to send a patch :-) johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] namespace issues
Hi, On Mon, 2008-09-22 at 12:45 -0700, Stanislav Malyshev wrote: 1. Allow braces for namespaces. So, the syntax for namespaces will be: a) namespace foo; should be first (non-comment) statement in the file, namespace extends to the end of the file or next namespace declaration. b) namespace foo {} can appear anywhere on the top scope (can not be nested). Mixing both syntaxes in one file is not possible. The semantics of both syntaxes will be identical. I'm fine with that, personally I'd like having only the {}-Syntax but as many people want both, well, ... For future times (6.0) we might think about adding nesting support - if we get it working good with the engine, but no show-stopper, we're delayed enough... 2. Simplify resolution order for classes in the namespace: unqualified names are resolved this way: a) check use list if the name was defined at use, follow that resolution b) if not, the name resolves to namespace::name Consequence of this will be that for using internal class inside namespace one would need to refer to it either as ::Foo or do use ::Foo prior to its usage. That will hurt a bit when working with DOM for example, but still +1. 3. Functions will not be allowed inside namespaces. We arrived to conclusion that they are much more trouble than they're worth, and summarily we would be better off without them. Most of the functionality could be easily achieved using static class methods, and the rest may be emulated with variable function names, etc. That's fine, I'm not sure about constants, neither one way nor the other, but in general I see some support for dropping them. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Disable PHAR by default
On Mon, 2008-09-29 at 14:32 +0200, David Zülke wrote: Totally hating to bring this up again (and hijacking this thread), but can we please enable ext/xsl by default in 5.3? : Only possible when bundling libxslt - no way. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php