RE: [PHP-DEV] DateTime improvement

2012-12-21 Thread Christian Stoller
What about putting the new DateTimeImmutable (or whatever it will be called) into a PHP namespace? Something like \PHP\Foobar\DateTimeImmutable Is it generally planned to use namespaces for PHP classes? In my opinion it would be nice if the SPL and other classes would be put into such a

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Jani Ollikainen
Hi, On 21.12.2012 8:15, Patrick Schaaf wrote: APC takes a LOCK_EX in exactly one place, apc_bin_dumpfile(), which does not look to me like it's related to include. The usage there is fishy anyway, not exactly sure, but I think the open that happens before taking LOCK_EX, will have truncated

Re: [PHP-DEV] How about implementing more data structures (ie Map, Set)

2012-12-21 Thread Victor Berchet
I don't have much time to work on this now. More next year ! Have ahappy Xmas. On 12/20/2012 09:43 PM, Levi Morrison wrote: As mentioned earlier, I've been working on a library(https://github.com/morrisonlevi/Ardent) with an honest effort to make the data-structures usable in several

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Stas Malyshev
Hi! Oh? Did I understand you correctly? If you can code PHP that crashes PHP, it's that codes fault not PHP's fault? I've always thought PHP to be high level programming language where PHP handles things for you and you can't code anything that crashes it like that with bus error? There

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Patrick Schaaf
On Thursday 20 December 2012 23:23:43 Stas Malyshev wrote: Hi! Is include supposed to take a LOCK_EX somehow? I can neither see that in php- src (5.4.9) nor APC-trunk, doing a cursory grepping. I'm not sure how any lock would help, since locks are optional, meaning you still can do the

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Patrick Schaaf
On Friday 21 December 2012 10:41:59 Jani Ollikainen wrote: So, my conclusion would be that it is the code snippet above, and not any part of PHP or the kernel, that is at fault. Oh? Did I understand you correctly? If you can code PHP that crashes PHP, it's that codes fault not PHP's

Re: [PHP-DEV] PHP5.5.0alpha2 release

2012-12-21 Thread Julien Pauli
On Fri, Dec 21, 2012 at 1:51 AM, Adam Harvey ahar...@php.net wrote: On 21 December 2012 01:26, jpauli jpa...@php.net wrote: We just tagged PHP 5.5.0alpha2 today. This release contains bug fixes against alpha1, as well as new features. Are we going to have a news post for this on the Web

Re: [PHP-DEV] DateTime improvement

2012-12-21 Thread Derick Rethans
On Thu, 20 Dec 2012, Larry Garfield wrote: I've seen DateTimeValue used elsewhere for userspace immutable date time objects. Whether that indicates we SHOULD or SHOULD NOT use that for an in-C version, I don't know. (I'm inclined to say should-but-namespace, but I don't know if we're

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Jani Ollikainen
Hi, On 21.12.2012 11:24, Patrick Schaaf wrote: I understand your sentiment. And I try to understand your technical point of view. I've thought that PHP handles concurrent stuff so that those kind of things won't happen and the user won't need to have for example mutexes to do stuff. But I

Re: [PHP-DEV] DateTime improvement

2012-12-21 Thread Nikita Nefedov
I don't think it would be ok to move just DateTimeImmutable to the namespace. There were proposal to move all the php functions and classes in namespaces, so that for example str_replace() could be \Str\replace() and array_map() could be \Array\map() and so on. On Fri, 21 Dec 2012 12:33:04

Re: [PHP-DEV] Crashes in lex_scan at Zend/zend_language_scanner.c / BUG #52752

2012-12-21 Thread Patrick Schaaf
I understood you correctly using temp file and then rename should fix that? Like this? file_put_contents('test.tpl.tmp', ?php #.str_repeat('A', mt_rand(4000, 5000)). ?\n, LOCK_EX); rename('test.tpl.tmp','test.tpl'); Exactly! You could also do it like this: $tmpname =

Re: [PHP-DEV] Complete traits redesign for 5.5

2012-12-21 Thread Dmitry Stogov
Hi, This is more or less final proposed patch for 5.4 http://pastebin.com/ceiWWD4N It fixes implementation mistakes and makes the whole implementation much simpler. I hope I didn't introduce new bugs :) Of course I checked it with PHP test suite, but it would be great to test it with real life

Re: [PHP-DEV] Adding Generator::throw()

2012-12-21 Thread Nikita Popov
On Mon, Dec 17, 2012 at 11:45 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Dec 17, 2012 at 11:03 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! Basically the method allows you to do delegate error handling to the coroutine, rather than doing it yourself (as you are not always

Re: [PHP-DEV] Adding Generator::throw()

2012-12-21 Thread Christopher Jones
On 12/21/2012 06:54 AM, Nikita Popov wrote: If there are no further objections I'll commit this tomorrow. Nikita This feature needs documenting in Generator RFC before it is committed. The RFC will be referenced by people new to the feature and so it should have a complete list of changes.

[PHP-DEV] Re: Changes in libcurl for CURLOPT_SSL_VERIFYHOST in 7.28.1

2012-12-21 Thread Pierrick Charron
The following solution was implemented : https://github.com/php/php-src/commit/517f800277a11d6ce05b0e1afcd0e76dc544d452 Pierrick On 18 December 2012 23:35, Pierrick Charron pierr...@webstart.fr wrote: Hi all, About 2 month ago, we had a discussion on this list about the fact that