Re: [PHP-DEV] re-proposal of pecl/phar for inclusion in core

2008-01-30 Thread Marcus Boerger
Hello Mike, not that I have any benchmarks. But I have one thing you might want to know. You extract a phar and map it to the extracted folder. That is any operation that would normally end up in the phar then ends up in direct file access. Doing so would add a tiny overhead for loading the

[PHP-DEV] CVS Account Request: robinf

2008-01-30 Thread Robin Fernandes
Contributing test cases (phpts). I have sent some tests to the QA list (http://news.php.net/php.qa/61935) and intend to contribute more in the near future. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Scott MacVicar
Hi all, Static callbacks behave differently between 5.2 and 5.3, I recently noticed this when trying to install PEAR, it printed a warning each time call_user_func and call_user_func_array was used. After some tracking down it seems like the callback option for zend_parse_parameters was

Re: [PHP-DEV] CVS Account Request: robinf

2008-01-30 Thread Marcus Boerger
Hello Robin, i've verified your account an am giving you access rights bow. Feel free to commit as soon as you see the 'avail' update. Thanks for the test we've got so far. marcus Wednesday, January 30, 2008, 11:14:41 AM, you wrote: Contributing test cases (phpts). I have sent some tests

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Etienne Kneuss
Hi, I planned to do some various callbacks related cleanups on 5_3. If that's ok with you, I'll come with a patch within the following days that should fix various issues, including your patch if still necessary. Regards On Jan 30, 2008 11:48 AM, Scott MacVicar [EMAIL PROTECTED] wrote: Hi all,

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Scott MacVicar
Hi, If you could rename IS_CALLABLE_CHECK_NO_ACCESS too that would be great, at first glance I expected it to check access on the callback. In reality its to skip the access check, so might be worth checking from a clarity point of view. IS_CALLABLE_SKIP_ACCESS_CHECK or

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Dmitry Stogov
The final nowdoc patches are attached. I'm going to commit them on Thursday in case of no objections. Thanks. Dmitry. Stanislav Malyshev wrote: Hi all! I remember the topic of 'nowdocs' (if you don't remember what it is, read on) was already discussed, but nothing really happened about it.

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Pierre Joye
On Jan 30, 2008 3:00 PM, Antony Dovgal [EMAIL PROTECTED] wrote: On 30.01.2008 16:41, Dmitry Stogov wrote: The final nowdoc patches are attached. I'm going to commit them on Thursday in case of no objections. So the current syntax is $var = 'TEXT' text 'TEXT'; am I right? I believe

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 17:19, Pierre Joye wrote: I believe it's far from readable and clear and I suggest not to add it until we have a better syntax. What do you suggest? :) I suggest to wait until we find a better syntax. I do not suggest any syntax myself because I do not see any need in this

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Richard Quadling
On 30/01/2008, Antony Dovgal [EMAIL PROTECTED] wrote: On 30.01.2008 17:19, Pierre Joye wrote: I believe it's far from readable and clear and I suggest not to add it until we have a better syntax. What do you suggest? :) I suggest to wait until we find a better syntax. I do not

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Dmitry Stogov
The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = 'TEXT' text TEXT; Thanks. Dmitry. Antony Dovgal wrote: On 30.01.2008 16:41, Dmitry Stogov wrote: The final nowdoc patches are attached. I'm going to commit them on Thursday in case of no

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 17:46, Richard Quadling wrote: As we may be missing a trick, how do you create strings which have $ and ' and in them? $string = 'it\'s not that hard to add a $slash'; or $string = END since when do we need a \$new 'language construct' to save one keystroke? END; or even

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Marcus Boerger
Hello Scott, actually it was a bug. We, sorry I, did not spot this in earlier versions. Now saying you rely on a bug in PHP 5 to be able to execute PHP 4 code simply does not work. marcus Wednesday, January 30, 2008, 11:48:50 AM, you wrote: Hi all, Static callbacks behave differently

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Antony Dovgal
On 30.01.2008 18:06, Marcus Boerger wrote: Hello Scott, actually it was a bug. We, sorry I, did not spot this in earlier versions. Now saying you rely on a bug in PHP 5 to be able to execute PHP 4 code simply does not work. I believe the bug was to make non-static methods to behave

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Scott MacVicar
Marcus, I fully agree that you should add static keywords if you intend to call a method statically, but it's not always possible. Some people are still maintaing a code base that runs in both PHP 4 and 5 without any significant changes. The other problem here is inconsistency, I can call

Re: [PHP-DEV] A moving instance

2008-01-30 Thread Antony Dovgal
On 30.01.2008 18:30, Lars Strojny wrote: Hi, I've recently stumbled upon the following issue: when calling a non-static function statically from a non-static class, the instance magically moves to the called class. It throws a strict warning, but I wonder if this is enough. The attached

[PHP-DEV] A moving instance

2008-01-30 Thread Lars Strojny
Hi, I've recently stumbled upon the following issue: when calling a non-static function statically from a non-static class, the instance magically moves to the called class. It throws a strict warning, but I wonder if this is enough. The attached example produces Foo. cu, Lars -- »Die

Re: [PHP-DEV] BC break with callbacks in 5.3

2008-01-30 Thread Chuck Hagenbuch
Quoting Marcus Boerger [EMAIL PROTECTED]: actually it was a bug. We, sorry I, did not spot this in earlier versions. Now saying you rely on a bug in PHP 5 to be able to execute PHP 4 code simply does not work. The bug is that with callbacks in PHP 5.3+, E_STRICT is enforced even when

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 21:38, Stanislav Malyshev wrote: $string = 'it\'s not that hard to add a $slash'; It's not too hard to add a slash unless you have to do it in a big chunk of text that may contain quotes, slashes, etc. - e.g. random PHP code for a template generation. Templates are usually

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Antony Dovgal
On 30.01.2008 21:40, Stanislav Malyshev wrote: Waiting for better syntax when there's nobody willing to actually work on this syntax is just another way to say kill it. Nobody willing to actually work on this effectively means nobody actually needs it. -- Wbr, Antony Dovgal -- PHP

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
$string = 'it\'s not that hard to add a $slash'; It's not too hard to add a slash unless you have to do it in a big chunk of text that may contain quotes, slashes, etc. - e.g. random PHP code for a template generation. Going over it each time is sure recipe for errors, and is very annoying.

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
Also looking at the discussion, I can see only 6 people involved (including Dmitry), which most likely means nobody is really interested in that nowdoc and this is yet another reason not to add it. I don't see how 'foo' is anything but obvious to anybody that gives himself a second to

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Adam Maccabee Trachtenberg
On Wed, 30 Jan 2008, Stanislav Malyshev wrote: Also looking at the discussion, I can see only 6 people involved (including Dmitry), which most likely means nobody is really interested in that nowdoc and this is yet another reason not to add it. I don't see how 'foo' is anything but

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Rasmus Lerdorf
Greg Beaver wrote: Dmitry Stogov wrote: The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = 'TEXT' text TEXT; I would like to see nowdocs. The closest equivalent in another syntax I can think of is xml's CDATA. Perhaps we can borrow

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Greg Beaver
Dmitry Stogov wrote: The feature is very useful, however, I agree, the syntax would be better. :) The current syntax: $var = 'TEXT' text TEXT; I would like to see nowdocs. The closest equivalent in another syntax I can think of is xml's CDATA. Perhaps we can borrow something similar to

[PHP-DEV] Bug in pcre (pcre.backtrack_limit)?

2008-01-30 Thread Karl Pflästerer
Hi, when pcre.backtrack_limit is reached with preg_replace() the subject string gets truncated to a string of length zero. Here is a simple example (yes I know you shouldn't write a regexp like that but it is simplified from a real pattern a coworker used). ,[ PHP5.3 ] | m58s03:~# php -r '$s

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
I don't think the 'FOO' syntax is very obvious either, but I can't think of a better one and if there isn't a commonly known syntax we can steal from another language, then making up our own, no matter what it is, is We can steal from perl, which has exactly 'FOO' ;) -- Stanislav Malyshev,

[PHP-DEV] Re: [PECL-CVS] cvs: pecl /phar phar_object.c php-src NEWS php-src/ext/spl spl_directory.c spl_directory.h

2008-01-30 Thread Marcus Boerger
Hello internals, pecls interesting, when comitting to php-src and pecl the mail goes to pecl :-( Hello Steph, since you found the issue, how about you test whether it works correct now? For development I basically experimented with stuff like this: php -r '$i=new

Re: [PHP-DEV] Bug in pcre (pcre.backtrack_limit)?

2008-01-30 Thread Karl Pflästerer
Felipe Pena [EMAIL PROTECTED] writes: Hello Em Qua, 2008-01-30 às 20:57 +0100, Karl Pflästerer escreveu: Hi, when pcre.backtrack_limit is reached with preg_replace() the subject string gets truncated to a string of length zero. I changed the phrase about the return value (3 weeks ago) in

RE: [PHP-DEV] nowdocs again

2008-01-30 Thread Andi Gutmans
I think it's actually pretty useful and not that uncommon to have large chunks of text which you want to capture in a variable (and not deal with the shortcomings of single quotes and/or output buffering in those instances). The fact that you haven't found use in it doesn't mean that others

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Keryx Web
Andi Gutmans skrev: I think if the syntax is confusing we can go for just a single quote as part of the operator which doesn't make it look like just another plain old string, e.g.: $bar ='FOO Sdjfslk Sdfkj FOO; +1/2 Once again thinking as a teacher... Just a few weeks into my last course

Re: [PHP-DEV] Bug in pcre (pcre.backtrack_limit)?

2008-01-30 Thread David Coallier
On Jan 30, 2008 4:03 PM, Karl Pflästerer [EMAIL PROTECTED] wrote: Felipe Pena [EMAIL PROTECTED] writes: Hello Em Qua, 2008-01-30 às 20:57 +0100, Karl Pflästerer escreveu: Hi, when pcre.backtrack_limit is reached with preg_replace() the subject string gets truncated to a string of

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Markus Fischer
Hi, Andi Gutmans wrote: I think if the syntax is confusing we can go for just a single quote as part of the operator which doesn't make it look like just another plain old string, e.g.: $bar ='FOO Such a thing is not nice for casual string syntax highlighting in editors. Needs a special

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Stanislav Malyshev
Such a thing is not nice for casual string syntax highlighting in editors. Needs a special rule to handle an opening but not closing single quote .. mhmmm :/ I think for 'FOO' syntax it should be pretty easy to fix the highlighter - e.g. just add quote processing to the rule that does . --

RE: [PHP-DEV] nowdocs again

2008-01-30 Thread Andi Gutmans
Yeah that is very true. I guess Perl way of doing 'FOO' is better after all :) Andi -Original Message- From: Markus Fischer [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 2:33 PM To: Andi Gutmans Cc: Antony Dovgal; Stas Malyshev; PHP Internals Subject: Re: [PHP-DEV]

Re: [PHP-DEV] nowdocs again

2008-01-30 Thread Gregory Beaver
Markus Fischer wrote: Hi, Andi Gutmans wrote: I think if the syntax is confusing we can go for just a single quote as part of the operator which doesn't make it look like just another plain old string, e.g.: $bar ='FOO Such a thing is not nice for casual string syntax highlighting in

[PHP-DEV] PHP taint support updated

2008-01-30 Thread Wietse Venema
other people can exploit them. The implementation provides taint support for basic operators and for a selection of built-functions and extensions. For examples and details, see the README file, also on-line at: ftp://ftp.porcupine.org/pub/php/php-5.2.5-taint-20080130.README.html I need your