Re: [PHP-DEV] Reflection, Traits, Aliasing

2011-08-09 Thread Joey Smith
On Mon, Aug 08, 2011 at 03:52:37PM +0100, Keloran wrote: > There seems to be a bug in traits that if you use any of the GLOBAL vars it > segfaults I'm not sure it's clear from Keloran's code example here, so I thought I'd point out that the problem only seems to happen if you include the trait d

Re: [PHP-DEV] Coverity Scan

2011-08-09 Thread Joey Smith
On Tue, Aug 09, 2011 at 12:19:53AM -0700, Rasmus Lerdorf wrote: > On 08/08/2011 11:45 PM, Joey Smith wrote > > A lot of the 'STACK_USE' ones seem to be false positives; it's reporting > > when the stack "exceeds the maximum single use of 1024 bytes" - that 1

Re: [PHP-DEV] Coverity Scan

2011-08-08 Thread Joey Smith
On Sat, Aug 06, 2011 at 08:07:01PM -0700, Rasmus Lerdorf wrote: > Coverity has run a new scan of trunk and there are a lot of valid > issues. You have probably noticed that I have started to fix some of > them, but there are 500+ to go, so I could use some help. The following > people already have

Re: [PHP-DEV] [RFC] Choosing a distributed version control system for PHP (or not). Call for Participation.

2011-08-08 Thread Joey Smith
On Mon, Aug 08, 2011 at 10:44:12AM -0700, Stas Malyshev wrote: > Hi! > > On 8/8/11 9:34 AM, Johannes Schlüter wrote: > > * It is said that the preferred way to get a patch from one branch > > to another is by doing a merge operation in the VCS. Depending > > on the timing we

Re: [PHP-DEV] [RFC] Choosing a distributed version control system for PHP (or not). Call for Participation.

2011-08-08 Thread Joey Smith
On Sun, Aug 07, 2011 at 04:50:55PM -0400, David Soria Parra wrote: > Hi Internals, > > NOTE: this is not the place for any religiouise discussion about git vs > mercurial whatsover. if you have nothing else to add than "hg is $*** > anyway" or think hosting platform XY will solve all our problems

Re: [PHP-DEV] BUG 55240 - wrong date creation

2011-08-03 Thread Joey Smith
On Wed, Aug 03, 2011 at 01:29:54PM -0600, Joey Smith wrote: > DateTime::createFromFormat("dn", "118") > -- Did you mean "August 11th", "November 8th", or "June 1st"? Pardon my idiocy, here - it's quite clear that "November

Re: [PHP-DEV] BUG 55240 - wrong date creation

2011-08-03 Thread Joey Smith
On Thu, Aug 04, 2011 at 01:06:38AM +0800, Laruence wrote: > Hi: >I read the ext/date/lib/parse_date.c, and I think this could not be a bug , >since 800 will be think as 80h 0min(timelib_get_nr is common > function, to get number from data description string with fixed max > length), >th

Re: [PHP-DEV] c and php operations

2011-07-29 Thread Joey Smith
On Fri, Jul 29, 2011 at 02:20:17PM -0300, Adir Kuhn wrote: > Hello guys, > > while I'm studing some c codes i found this page: > http://www.nicksays.co.uk/2009/05/awesome-c-exam-question/ > > and this code: > > #include > int func (int a, int b) { > static int c = 1; > return a + b

Re: [PHP-DEV] [PATCH] crypt_blowfish 1.2

2011-07-17 Thread Joey Smith
On Sun, Jul 17, 2011 at 10:26:16PM +0400, Solar Designer wrote: > + * For actual implementation, we set an array index in the variable "bug" > + * (0 means no bug, 1 means sign extension bug emulation) and a flag in the > + * variable "safety" (bit 16 is set when the safety measure is requested). >

Re: [PHP-DEV] Req #51295: busyTimeout method for SQLite3

2010-03-16 Thread Joey Smith
On Sun, Mar 14, 2010 at 09:15:37AM -0400, Wez Furlong wrote: > I'm sure that the docs team will add this to the manual if you ask them > politely. > > Specifically, PDO_SQLITE defaults to a 60 second busy timeout. This can > be changed by setting PDO::ATTR_TIMEOUT. The value is specified in >

Re: [PHP-DEV] On closures and lamdba

2010-02-20 Thread Joey Smith
> Oh, yes, the question: > > Wouldn't you agree that it is better for PHP to use the word closure as > it is being used in the JavaScript community? There's a pretty big difference between how PHP implements closures and how JavaScript implements them - in PHP, you have to explicitly request whi

Re: [PHP-DEV] PATCH for bug #47199

2010-02-09 Thread Joey Smith
If anyone ever needs me to host a patch, there's more than enough room at patch.joeysmith.com, just email me the patch as an attachment off-list. It'd probably be better than relying on a pastebin. On Tue, Feb 09, 2010 at 04:38:44PM +0100, Johannes Schlüter wrote: > Hi, > > On Tue, 2010-02-09 at

Re: [PHP-DEV] imap4 search criteria

2010-01-30 Thread Joey Smith
There's an open bug on this, #15238 (http://bugs.php.net/bug.php?id=15238&;). I'm sure patches would be welcomed. On Fri, Jan 29, 2010 at 03:49:18PM -0500, Dominik Gehl wrote: > Hi, > > I noticed that the imap extension seems to support only IMAP2 search criteria. > > This is caused by the fact

[PHP-DEV] Subscribe to PDO list (was Re: [PHP-DEV] [PATCH] PDO DBLIB)

2010-01-22 Thread Joey Smith
On Fri, Jan 22, 2010 at 04:32:55AM +, Niel Archer wrote: > Well whaddya-know! This time it worked for me, although 45 minutes wait > seems long. I'd given up 20 minutes after the other requests had been > answered. I had the same problem and waited several weeks between attempts, checking my i

Re: [PHP-DEV] Dots and spaces in variable names are converted to underscores.

2010-01-20 Thread Joey Smith
On Wed, Jan 20, 2010 at 02:29:27PM -0800, Rasmus Lerdorf wrote: > Well, that conversion still needs to happen somewhere, since plenty of > apps call extract() on those superglobals, but with register_globals > entirely gone in PHP 6, I suppose that conversion can be moved to the > extract() c

Re: [PHP-DEV] any solution about array_walk with pass-by-reference UseData?

2010-01-12 Thread Joey Smith
This might be better served by taking it to php-general, because I don't think you need to pin your question so hard to the behaviour of array_walk(). Here's a quick example of (if I understood your question correctly) how you might solve it using array_udiff_uassoc and 5.3's new 'closure' syntax (

Re: [PHP-DEV] Passing error codes through to PDOException

2010-01-11 Thread Joey Smith
I also just attached the following to the bug - it's a test that checks this fix in the sqlite driver - I can write tests for all the others if need be, but I figured there are others who might already be more familiar with the individual PDO drivers that would write them more quickly than I. --

[PHP-DEV] Passing error codes through to PDOException

2010-01-11 Thread Joey Smith
Maybe I'm up in the night, but I've just opened 50728 because I discovered that all the PDO drivers had a hardcoded 0 where I would expect to see the driver-specific error - a user reported this in ##PHP on Freenode and I take a stab at writing the patches that would let the individual drivers p

Re: [PHP-DEV] Closures and $this: Please vote!

2009-12-16 Thread Joey Smith
On Tue, Dec 15, 2009 at 08:46:44PM +0100, Christian Seiler wrote: > (A+): (A) + Closure::bind & Closure->bindTo for rebinding > if this is wanted & the possibility to call a closure as an object > method. (See last section of RFC for details) +1 for "A+" with class scope option 2 I'm

Re: [PHP-DEV] [PATCH] fpm/typo: change some log about dynamic + homogenize log message about pool

2009-12-15 Thread Joey Smith
On Tue, Dec 15, 2009 at 02:27:30PM -0800, Michael Shadle wrote: > However if people have ideas on how this will help or be useful (i.e. > you -are- planning on running logfiles or logwatch or something) then > it might be smart to bring it back to the table again. Jérôme and I > were talking about

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Joey Smith
> Feel free to collaborate with the authors of PHP_Compat [1]. > > regards, > Lukas Kahwe Smith > m...@pooteeweet.org > > [1] http://pear.php.net/package/PHP_Compat An excellent pointer, Lukas, thank you. I had forgotten PHP_Compat existed. -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Joey Smith
Ooops: On Mon, Oct 12, 2009 at 01:48:28PM -0600, Joey Smith wrote: > $delimiters = > array(chr(1),chr(1),chr(1),chr(1),chr(1),chr(1),'/', '@', '#', '%', '_'); should have been $deli

Re: [PHP-DEV] Why is ereg being deprecated?

2009-10-12 Thread Joey Smith
Write yourself a bit of code that replaces ereg which could be installed in an auto_prepend location server-wide. Here's an example you could start with, although I should point out that I spent all of about 30 seconds thinking about it, so you might want to give it more thought than that - I'm sur

Re: [PHP-DEV] shebang skipping in 5.3.0

2009-09-04 Thread Joey Smith
I definitely had the wrong changeset - sorry, Nuno. :) Looks like maybe 273177 is the problem child. http://tinyurl.com/lewcft On Fri, Sep 04, 2009 at 09:25:52AM +0100, Scott MacVicar wrote: > > > On 4 Sep 2009, at 09:16, Joey Smith wrote: > >> I can understand not having the

Re: [PHP-DEV] shebang skipping in 5.3.0

2009-09-04 Thread Joey Smith
On Fri, Sep 04, 2009 at 02:16:40AM -0600, Joey Smith wrote: > Per his email[1] almost a year ago, Dmitry removed the [1] should have been: http://tinyurl.com/kwne3v -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] shebang skipping in 5.3.0

2009-09-04 Thread Joey Smith
I can understand not having the 'shebang skipping' code in both the SAPI *and* the scanner, but we probably need to have it in at least ONE of them. :) Per his email[1] almost a year ago, Dmitry removed the shebang line check from sapi/cgi/cgi_main.c in changeset 264153, saying: Removed sh

Re: [PHP-DEV] mail() and header folding/line endings

2009-08-23 Thread Joey Smith
Wietse: On Fri, Aug 21, 2009 at 04:41:31PM -0400, Wietse Venema wrote: > The Postfix sendmail command prefers input in native UNIX stream-lf > format. Postfix will jump some hoops for software that wants to > use the non-native CRLF format. It uses a switch (going from using > LF to using CRLF) an

Re: [PHP-DEV] mail() and header folding/line endings

2009-08-21 Thread Joey Smith
On Fri, Aug 21, 2009 at 04:55:31PM +0100, Chris Smith wrote: > > I've encountered difficulties utilising the mail() function properly > under a NIX environments while conforming to RFC 2822. There two > specific issues, one is a code problem the other a documentation > issue they are intertwined s

[PHP-DEV] dbase extension

2009-08-19 Thread Joey Smith
I know - dbase. Why is anyone still trying to use this? However, I thought it worth noting tha tthe extension is documented as "moved to PECL", but it doesn't appear to be there - at least, I couldn't find it at pecl.php.net/dbase or via the search form at pecl.php.net -- PHP Internals - PHP Run

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-30 Thread Joey Smith
On Thu, Jul 30, 2009 at 10:48:49AM +0200, Hannes Magnusson wrote: > No PHP warnings at all. > > > Again. The examples you are looking for are network issues with > fopen(), file_get_contents() and such things. > > -Hannes Hannes, these are actually the ones I had in mind when I sent my last ema

Re: [PHP-DEV] Re: RFC: Replacing errors with Exceptions

2009-07-29 Thread Joey Smith
On Wed, Jul 29, 2009 at 05:33:18PM -0400, Alban wrote: > The result is it's impossible to use this function without @ statement. SimpleXML is hardly alone here, but I would imagine that if we could identify these and get bugs opened on them, there'd be very little resistance to fixing that aspect.

[PHP-DEV] crypt() post 5.3.0

2009-06-28 Thread Joey Smith
ext/standard/crypt.c contains a whole bunch of #if's which, as I read it, won't be very meaningful after 5.3.0, where we provide our own implementations of any missing crypt() algorithms. Most notably, automatic salt generation, which I think will always use MD5 from now on? Also, since blowfis

[PHP-DEV] Register constants for error_log

2003-12-09 Thread Joey Smith
It simply ocurred to me that the "magic numbers" being used for the 2nd param to error_log() could just as easily be constants. Just one possible way: http://joeysmith.com/~joey/constants.diff -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsu

[PHP-DEV] sixth mode for count_chars

2003-06-14 Thread Joey Smith
The two attached files add a sixth mode to count chars, one that comes up now and again. This is the same as mode 1, but the resulting array has the actual char as the array index instead of the byte-value. This can be used in place of preg_split('//', $string) and such. I've also prepared patche

Re: [PHP-DEV] Make switch/case to type sensitive comparison in PHP 5?

2003-03-24 Thread Joey Smith
See also bug 21990. http://bugs.php.net/lbugs.php?id=21990 On Mon, Mar 24, 2003 at 06:07:02AM -0700, Joey Smith wrote: > I was reminded tonight of the following 'feature' of switch: > > $a = 0; > switch($a) { > case 'somestring': echo 'Bug?'; b

[PHP-DEV] Make switch/case to type sensitive comparison in PHP 5?

2003-03-24 Thread Joey Smith
I was reminded tonight of the following 'feature' of switch: $a = 0; switch($a) { case 'somestring': echo 'Bug?'; break; case 0: echo 'Not a bug'; break; } This will echo 'Bug?' with PHP 4. It seems more logical to have switch comparing with T_IS_IDENTICAL than with T_IS_EQUAL. Is

Re: [PHP-DEV] Patch: Some undocumented php.ini directives

2003-03-22 Thread Joey Smith
L. Can you confirm/deny that? On Sat, Mar 22, 2003 at 07:09:33PM +0100, Michael Bretterklieber wrote: > Hi, > > Joey Smith wrote: > >I'm not sure what to do with these, but it annoys me that there are > >directives which don't even appear in php.ini-dist which can actu

[PHP-DEV] Patch: Some undocumented php.ini directives

2003-03-22 Thread Joey Smith
I'm not sure what to do with these, but it annoys me that there are directives which don't even appear in php.ini-dist which can actually affect how PHP works. Here's some I've found, but I'm not sure what the policy is. Anyone have a problem with adding these after 4.3.2? Jani: These aren't new d

Re: [PHP-DEV] add SMTP authentication to php.mail() function

2003-03-18 Thread Joey Smith
John: Regardless of what happens with your patches, I thought perhaps you might want to know that PEAR has a class Net::SMTP which supports authentication. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: cookie to override accept-language

2003-03-13 Thread Joey Smith
So does TML++... http://gallery.joeysmith.com/jj/agn On Thu, Mar 13, 2003 at 05:20:24PM +0100, Derick Rethans wrote: > On Thu, 13 Mar 2003, Gabor Hojtsy wrote: > > > Before adding a cookie for users to override their accept-language > > settings, I am asking here, if anybody has any objections.