RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-08-01 Thread Jonathan Bond-Caron
Also, be aware that BCrypt only uses the first 72 characters of the password field. So if you use a hex encoded sha512 output, a good deal of entropy would be lost (almost half of it)... Good to know, do most hash algorithms have limitations on the # of chars as input? That would

RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-08-01 Thread Jonathan Bond-Caron
On Tue Jul 31 12:21 PM, Anthony Ferrara wrote: Jonathan, Again, implementing something in the core that's not verified and can't be implemented well by the vast majority of developers out there. Alright so I found some people supporting my claims:

RE: [PHP-DEV] [DRAFT RFC] Adding Simplified Password Hashing API

2012-07-31 Thread Jonathan Bond-Caron
On Wed Jun 27 12:32 PM, Arvids Godjuks wrote: because at the moment i do not understand how salt stored in the hash itself makes hash more secure than an unsalted one. a) In terms of 'effort' to break many passwords, there's a benefit to the salt stored in the hash itself. It's not 'more

RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-07-31 Thread Jonathan Bond-Caron
On Thu Jul 12 02:34 PM, Anthony Ferrara wrote: https://wiki.php.net/rfc/password_hash -- password_hash() password_hash_rfc(string $password, int $algo, array $options = array()) My personal opinion is the api should be: password_hash(string $password, string $secret = '', array $options =

RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-07-31 Thread Jonathan Bond-Caron
Say you have: define('MY_HASHING_SECRET', 'hhtrg54~%$%4long'); $password = '1234'; password_hash_rfc($password . MY_HASHING_SECRET, PASSWORD_METHOD_BCRYPT); password_hash($password, MY_HASHING_SECRET); Note here that in both cases we let crypt() generate a random salt that is

RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-07-31 Thread Jonathan Bond-Caron
RFC:  https://wiki.php.net/rfc/password_hash#the_api_does_not_support_pepper Thanks, I missed it... I strongly disagree with this, the 'pepper' IMHO is a best practice for web applications. I prefer to live with the idea that an attacker may comprise some database(s) in the 'cloud' but

RE: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-07-31 Thread Jonathan Bond-Caron
On Tue Jul 31 10:54 AM, Anthony Ferrara wrote: On Tue, Jul 31, 2012 at 10:28 AM, Jonathan Bond-Caron HYPERLINK I strongly disagree with this, the 'pepper' IMHO is a best practice for web applications. Again, I have not seen this being said by any security or cryptography expert

RE: [PHP-DEV] [RFC] Add hash_pbkdf2 function

2012-06-20 Thread Jonathan Bond-Caron
On Mon Jun 18 07:14 PM, Anthony Ferrara wrote: https://wiki.php.net/rfc/hash_pbkdf2 I like this proposal, it could be useful to add a simpler api that has defaults matching the NIST recommendation: hash_password($password, $salt, $algo = 'sha1', $iterations = 1000); if the salt doesn't

RE: [PHP-DEV] Re: SPLClassLoader RFC Thoughts And Improvements

2011-11-11 Thread Jonathan Bond-Caron
On Fri Nov 11 12:13 AM, Stas Malyshev wrote: - MODE_DEBUG: This one can work together with the other two, allowing a validation of class/interface/trait presence in the file. Basically, it requires the file and then checks if the item exists in scope. Not sure debug adds much here -

RE: [PHP-DEV] who can vote

2011-11-10 Thread Jonathan Bond-Caron
On Wed Nov 9 10:01 PM, guilhermebla...@gmail.com wrote: Some would simply say he only did that because he got 3 proposals rejected. Others would say he is pressuring A to be in PHP. But not. I learned the hard way and multiple times to hear a big NO. But at the same time, I earn my salary

[PHP-DEV] SVN Account Request: jbondc

2011-11-07 Thread Jonathan Bond-Caron
Bring improvements to serialize() and unserialize() -- a consistent serialize_text() which does change based on config + no more NULL bytes. Possible improvements to PDO and stream related enhancements. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

RE: [PHP-DEV] SplClassLoader

2011-11-04 Thread Jonathan Bond-Caron
On Thu Nov 3 03:06 PM, Will Fitch wrote: Wouldn't you consider spl_autoload_register an interoperability solution? Only your defined autoloading function would then need to know how your file system is structured, there'd be no need for include_path declarations and you wouldn't have to

RE: [PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-11-04 Thread Jonathan Bond-Caron
On Sat Oct 22 04:38 AM, Nathan Nobbe wrote: Hi folks, With a 5.4 release right around the corner I'd like a moment of your time to reconsider this issue [1]. Just curious why it died on the table if several folks saw value in it, including Stephan who I gather is the primary architect of

RE: [PHP-DEV] SplClassLoader

2011-11-03 Thread Jonathan Bond-Caron
On Thu Nov 3 11:19 AM, Anthony Ferrara wrote: But that's besides the point. I just want to emphasize the point that performance should not be a criteria for justifying it going into the core... There also seems to be the perception among some php devs that autoloading is now the

RE: [PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-10-22 Thread Jonathan Bond-Caron
On Sat Oct 22 10:25 AM, Anthony Ferrara wrote: Well, I have a few opinions on this that I think are worth sharing: 1. If this change is made, we no longer would have mixins, but would have regular multiple-inheritance (With all the issues associated with it). Note that I said mixins and

RE: [PHP-DEV] is_a fix for 5.4 and HEAD

2011-10-17 Thread Jonathan Bond-Caron
On Sun Oct 16 06:59 PM, Stas Malyshev wrote: It definitely makes PHP worse by propagating inconsistent APIs. I created a patch against 5.4: https://bugs.php.net/patch-display.php?bug_id=55475patch=is_a_5.4_alternati verevision=latest The patch changes the behavior to: is_a(ab, b) // false

RE: [PHP-DEV] Re: is_a() - again - a better fix

2011-09-22 Thread Jonathan Bond-Caron
On Wed Sep 21 09:57 AM, Matthew Weier O'Phinney wrote: It then reverts is_a() back to the previous behavior, and clarifies the documentation. To respect the release RFC, we shouldn't introduce a new BC break (breaking behavior with something already released). That's just a

RE: [PHP-DEV] PHP 5.3.8 Released!

2011-09-02 Thread Jonathan Bond-Caron
On Wed Aug 24 08:42 AM, Pierre Joye wrote: Hi Alan, the breakage is about is_a with a string as 1st argument, not is_a as a whole. So yes, it breaks is_a alone is used as validation. I've been digging more into this:

RE: [PHP-DEV] TameJS syntax for Async/Parallel execution in PHP

2011-08-19 Thread Jonathan Bond-Caron
On Thu Aug 4 09:54 PM, Raymond Irving wrote: Hello, I came across this little library called TameJS (http://tamejs.org/) and fell in love with the it's syntax. This had me thinking if it was possible to add such features to a PHP CLI (or web app): Thanks for sharing, never heard of

RE: [PHP-DEV] Activation of IGBinary serialization extension in 5.4 by default

2011-08-19 Thread Jonathan Bond-Caron
On Fri Aug 19 03:48 AM, Kingsquare.nl - Robin Speekenbrink wrote: Also the proposed include it - read the data - convert on write if in previous format (possibly an ini setting?) would provide full BC and would allow a painless upgrade... wouldnt it? 100% against enabling it by default.

RE: [PHP-DEV] [VOTE] Weak References

2011-08-03 Thread Jonathan Bond-Caron
On Wed Aug 3 05:16 PM, Lester Caine wrote: Jan Dolecek wrote: I was waiting for this for a while! I wrote a blog post how to get best benefits from weak references: http://blog.juzna.cz/2011/08/weak-references-in-php/ Perhaps this will help showing people what are they good for. Or

RE: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-22 Thread Jonathan Bond-Caron
On Fri Jul 22 11:17 AM, Alex Howansky wrote: trait foo { public $zoo = 'foo::zoo'; public function bar() { echo in foo::bar\n; } } class baz { use foo; public $zoo = 'baz::zoo'; public function bar() { echo in

RE: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-22 Thread Jonathan Bond-Caron
On Fri Jul 22 01:46 PM, Alex Howansky wrote: Sure, but in this case, I created the conflict intentionally because I *want* to override it, and I'm not allowed to like I am with methods. Don't you think that's inconsistent? Agree The short answer is it's not a bug but maybe an

RE: [PHP-DEV] foreach() for strings

2011-06-22 Thread Jonathan Bond-Caron
On Wed Jun 22 11:25 AM, Reindl Harald wrote: and php as primary web-language is missing UTF8 support in the core You have a valid point. Now onto foreach() for strings, any other opinions? Seems like the discussion is closed and most likely should move to a RFC with some consideration about

RE: [PHP-DEV] foreach() for strings

2011-06-20 Thread Jonathan Bond-Caron
On Mon Jun 20 09:11 AM, Lee davis wrote: Could we also use current(), next() and key() for iteration of strings? $string = 'string'; while ($char = current($string)) { echo key($string) // Would output the offset position I assume 0,1,2 etc?? echo $char // outputs each letter

RE: [PHP-DEV] annotations again

2011-05-10 Thread Jonathan Bond-Caron
On Tue May 10 11:07 AM, guilhermebla...@gmail.com wrote: I'm not putting traits support inclusion on risk. I'm a string +1 to it. All I want is that you stop giving stupid arguments to be against the patch instead of giving *real* relevant arguments. Complexity:

RE: [PHP-DEV] 5.4 again

2011-05-10 Thread Jonathan Bond-Caron
On Mon May 9 07:29 PM, guilhermebla...@gmail.com wrote: Hi Andi, Sorry, but I mentioned on other thread that RFC is outdated. I just finished an update to it bringing to recent implementation. The idea is to get the big picture here, I may have left from previous RFC, but if I did that,

RE: [PHP-DEV] Function proposal: varset

2011-04-21 Thread Jonathan Bond-Caron
On Wed Apr 20 04:41 PM, D. Dante Lorenso wrote: My proposal was called filled since it was the opposite of empty which already existed. I extended the function to return the first non-empty value or null if all values evaluated as empty. You could use the function like this: $x =

RE: [PHP-DEV] Function proposal: varset

2011-04-20 Thread Jonathan Bond-Caron
On Wed Apr 20 10:55 AM, Mark wrote: function varset($arr, $key, $default = '') { return (isset($arr[$key]) ? $arr[$key] : $default); } where the call would be: $var = varset($_GET, 'var'); I personally like both ways... My proposal is to make this function a core php function in PHP

RE: [PHP-DEV] Adding a more logical string slicing function to PHP

2011-03-30 Thread Jonathan Bond-Caron
On Wed Mar 30 09:05 AM, Hannes Landeholm wrote: var_dump(\substr(foo, 5, 6) == , (string) false, false == ); Welcome to PHP. To be honest this criticism pretty much falls in the from person that comes from another language X and is annoyed that every little detail isn't exactly the

RE: [PHP-DEV] Extensions to traits

2011-02-15 Thread Jonathan Bond-Caron
On Sun Feb 13 05:15 AM, André Rømcke wrote: I have now made an RFC based on the most recent discussions: http://wiki.php.net/rfc/traitsmodifications I think it would sometimes be desirable to allow this, for instance when a trait has been updated in a framework to adapt to what has

RE: [PHP-DEV] Extensions to traits

2011-02-15 Thread Jonathan Bond-Caron
On Thu Feb 10 12:25 PM, Ben Schmidt wrote: http://wiki.php.net/rfc/traitsmodifications Some thoughts: a) Class method conflict with trait Class implementation always wins I feel is the right way to think about traits. But 'abstract' already has special meaning, so maybe a keyword like

RE: [PHP-DEV] Extensions to traits

2011-01-09 Thread Jonathan Bond-Caron
On Sat Jan 8 06:33 AM, Ben Schmidt wrote: Creating a patch will help getting feedback about what you're proposing http://ca3.php.net/reST/php-src/README.MAILINGLIST_RULES I hope I haven't broken any of the mailing list rules, but my apologies if I have, and please point out

RE: [PHP-DEV] Extensions to traits

2011-01-06 Thread Jonathan Bond-Caron
On Sun Jan 2 07:16 AM, Ben Schmidt wrote: I would also like to propose some extensions to the functionality as currently described, which I think could potentially add tremendous power to the mechanism, with relatively little additional conceptual complexity and implementation effort. I've

RE: [PHP-DEV] Traits and Properties

2010-12-22 Thread Jonathan Bond-Caron
On Mon Dec 20 06:21 PM, Stefan Marr wrote: = Handling of Properties/State = This property handling was implemented in [[http://svn.php.net/viewvc?view=revisionrevision=306476|SVN revision 306476]] and examples are given in the test cases. +1 The E_STRICT warning seems to

RE: [PHP-DEV] Traits and Properties

2010-12-18 Thread Jonathan Bond-Caron
On Sat Dec 18 10:29 AM, Stefan Marr wrote: At least I do not find an argument for either way that completely convinces me. At the moment, the main reason is that 'public' can be considered to be the default visibility modifier. Based on the semantics of 'var' and dynamic properties. Thus,

RE: [PHP-DEV] Traits and Properties

2010-12-18 Thread Jonathan Bond-Caron
On Sat Dec 18 12:33 PM, Stefan Marr wrote: Hi Jonathan: On 18 Dec 2010, at 18:14, Jonathan Bond-Caron wrote: Does the order of the declaration matter? No, the order does not matter, and that is one of the key points of traits compared to mixins or Python's way of multiple inheritance

RE: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-12 Thread Jonathan Bond-Caron
On Sat Dec 11 10:25 AM, Stefan Marr wrote: http://wiki.php.net/rfc/horizontalreuse#requiring_composing_class_to_impleme nt_interface Are there any objections to implementing this? It's not a bad idea, though I haven't found a strong need for it in the way I plan to use traits. It also

RE: [PHP-DEV] Patch: Marking DateTime Instances Immutable

2010-12-05 Thread Jonathan Bond-Caron
On Sun Dec 5 12:44 PM, Benjamin Eberlei wrote: 1. Just create a DateTimeValue object that is immutable, not optimizing PHP to handle it with efficient garbage collection. 2. One step further, add a static class DateTimeValue like syntax that creates an immutable class. Any ideas? Some

RE: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-12-02 Thread Jonathan Bond-Caron
On Thu Dec 2 02:11 AM, Larry Garfield wrote: See, here's the fundamental problem we're running into. There's three different definitions of what a property is that we keep bouncing between, each of which will dictate both syntax and semantics: 1) Properties are a smart masking layer

RE: [PHP-DEV] Performance of buffer based functionality (JSON, AES, serialize())

2010-12-02 Thread Jonathan Bond-Caron
On Tue Nov 30 03:26 AM, Julien Pauli wrote: I guess serialize mechanism cant use any char that can be part of a PHP variable. And _ can. As property names respect binary compatibility, the only char that can be used to mark private properties is actually the NULL byte. Ping me if I'm wrong.

RE: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-11-29 Thread Jonathan Bond-Caron
On Mon Nov 29 09:27 AM, Stas Malyshev wrote: Hi! Nice RFC, just an idea for an alternative syntax (added to the RFC as #2): property Hours { get { return $this-seconds / 3600; } set { $this-seconds = $value * 3600; } // The variable $value holds the incoming value to be

RE: [PHP-DEV] Performance of buffer based functionality (JSON, AES, serialize())

2010-11-28 Thread Jonathan Bond-Caron
On Thu Nov 25 12:47 PM, Andi Gutmans wrote: I know there have been some high-end apps that have benefited from some custom serializers, etc... (typically platform dependent). I wonder if people here think improvements in these areas would move the needle for the majority of mainstream apps

RE: [PHP-DEV] PHP 5.4 - Meta attribute (aka. Annotations) support discussion

2010-11-18 Thread Jonathan Bond-Caron
On Thu Nov 18 08:34 AM, guilhermebla...@gmail.com wrote: Hi Larry, For existent project examples and usage, here are 2 links of the upcoming versions of Doctrine 2 and Symfony 2: http://www.doctrine-project.org/projects/orm/2.0/docs/reference/basic-

RE: [PHP-DEV] PDO_DBLIB Native PHP Type binding

2010-11-05 Thread Jonathan Bond-Caron
On Fri Nov 5 12:57 AM, Stanley Sufficool wrote: And why is PHP client library using latin1 for data that just isn't latin1?  That's just asking for problems... Theoretically I could ask for UTF8, but then I don't want to have to run utf8_decode/utf8_encode on all query strings,

RE: [PHP-DEV] On how a little knowledge is completely useless.

2010-09-19 Thread Jonathan Bond-Caron
On Fri Sep 17 03:13 PM, Ralph Schindler wrote: Inline response: On 9/17/10 1:57 PM, Jonathan Bond-Caron wrote: On Fri Sep 17 01:06 PM, Guilherme Blanco wrote: Another good example is to map your persistence data into your Entities. Doctrine 2 implements this and I think that way you

RE: [PHP-DEV] On how a little knowledge is completely useless.

2010-09-17 Thread Jonathan Bond-Caron
On Fri Sep 17 01:06 PM, Guilherme Blanco wrote: Another good example is to map your persistence data into your Entities. Doctrine 2 implements this and I think that way you can compare easily with the PHP code alternative. I'd like to ask you to compate the same Entity mapped through

RE: [PHP-DEV] Re: PHP Annotations RFC + Patch

2010-09-16 Thread Jonathan Bond-Caron
-1 for the proposed Annotations concept and associated syntax +1 for adding APIs to parse doc blocks, minor note: should not be not called getAnnotations On Thu Sep 16 01:01 PM, Lars Schultz wrote: +1 for adding APIs to parse doc blocks -1 for introducing a new Annotations concept and

RE: [PHP-DEV] Re: PHP Annotations RFC + Patch

2010-09-16 Thread Jonathan Bond-Caron
On Thu Sep 16 02:44 PM, Stas Malyshev wrote: WTF is Annotations? We didn't define it yet. Should PHP support http://en.wikipedia.org/wiki/.NET_metadata http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-in-the-entity-framework-and-code-first.aspx .NET calls this attributes

RE: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch

2010-09-15 Thread Jonathan Bond-Caron
On Wed Sep 15 12:17 PM, Guilherme Blanco wrote: I think meta programming is not and would never be part of comment. As previously said, docblock means documentation, without any meaning to parser, entirely human readable and totally removable without affecting overall execution. I have to

RE: [PHP-DEV] Re: Re: PHP Annotations RFC + Patch

2010-09-14 Thread Jonathan Bond-Caron
On Tue Sep 14 01:25 PM, Nate Abele wrote: Sorry, but I don't see how this is even remotely close to being appropriate for PHP. Maybe I'm missing something. :-) I agree, the use cases are just not there Though maybe some form of annotations could be useful in php as a pluggable type:

RE: [PHP-DEV] inheritance check too strict?

2010-08-20 Thread Jonathan Bond-Caron
On Fri Aug 20 06:54 AM, Jean-Sébastien H. wrote: No it's wrong. A Child is a Parent so we must be able to pass a Parent to the method equals() defined on Child. The declaration of the parent functions must always be valid in the children. Maybe my OO theory is wrong but I was under

RE: [PHP-DEV] inheritance check too strict?

2010-08-20 Thread Jonathan Bond-Caron
On Fri Aug 20 08:24 AM, Nathan Rixham wrote: Jonathan Bond-Caron wrote: On Fri Aug 20 06:54 AM, Jean-Sébastien H. wrote: No it's wrong. A Child is a Parent so we must be able to pass a Parent to the method equals() defined on Child. The declaration of the parent functions must

RE: [PHP-DEV] inheritance check too strict?

2010-08-20 Thread Jonathan Bond-Caron
On Fri Aug 20 09:10 AM, Jonathan Bond-Caron wrote: Maybe Stas can comment but I can't reproduce the E_STRICT warning Is this php HEAD? class ObjParent { function set($param2 = '') {} } class ObjChild extends ObjParent { function set(){ echo .; } } My mistake

RE: [PHP-DEV] Typehints (was Re: [PHP-DEV] Annoucing PHP 5.4 Alpha 1)

2010-08-11 Thread Jonathan Bond-Caron
On Tue Aug 10 07:42 PM, Josh Davis wrote: Derick's point was about consistency. The approach described in his mail is consistent with current syntax and mechanism(s). Current typehints do not apply any kind of conversion, so treating scalar hints the same way is consistent with the current

[PHP-DEV] Zend Extension - zend_compile_file - interoperability?

2010-07-28 Thread Jonathan Bond-Caron
I've starting playing around with the zend engine, is there any hope / plans for better interoperability with how zend_compile_file() should be extended? The goal being to reduce the amount of X is not compatible with Y. It would be possible to separate extensions in two categories and

RE: [PHP-DEV] Remove sqlite2 from trunk

2010-06-18 Thread Jonathan Bond-Caron
On Wed Jun 16 07:04 AM, Ilia Alshanetsky wrote: drop the Sqlite2 extensions from Trunk as they are superseded by the Sqlite3 extensions. The sqlite2 library is no longer maintainer and the migration path from version 2 to 3 is very simple. Unless there any objections, I'd like to

RE: [PHP-DEV] Type hinting

2010-05-27 Thread Jonathan Bond-Caron
On Thu May 27 11:22 AM, David Soria Parra wrote: On 2010-05-27, Zeev Suraski z...@zend.com wrote: +1 from me for this. I think two solutions is not the right way and we +should try to make the type system consistent for the user. Therefore +1 for auto-converting. I still feel the debate of

RE: [PHP-DEV] Traits

2010-04-12 Thread Jonathan Bond-Caron
On Mon Apr 12 05:16 AM, Stefan Marr wrote: On 12 Apr 2010, at 10:39, Lukas Kahwe Smith wrote: On 12.04.2010, at 10:34, Derick Rethans wrote: Hi! But just as a quick response, without aliasing, there would be no way to use a conflicting method from a trait. On first sight, that is not

RE: [PHP-DEV] horizontal reuse: traits vs. grafts

2010-03-24 Thread Jonathan Bond-Caron
On Wed Mar 24 06:50 AM, Lukas Kahwe Smith wrote: Ahoi, Thought it would be better to open up a new thread and also using the term horizontal reuse in the subject so that we make it clearer that there are actually two approaches. Here is the URL for Stefan's proposal:

RE: [PHP-DEV] horizontal reuse: traits vs. grafts

2010-03-24 Thread Jonathan Bond-Caron
On Wed Mar 24 06:50 AM, Lukas Kahwe Smith wrote: The third sentence is not so clear to me, but if I guess it its also just a typo as it makes more sense to me when replacing renaming to result in renaming. But maybe you could tweak that paragraph to be a bit clearer. For example its still

RE: [PHP-DEV] Request for Comments: Horizontal Reuse for PHP

2009-10-15 Thread Jonathan Bond-Caron
On Wed Oct 14 04:07 PM, Lukas Kahwe Smith wrote: On 14.10.2009, at 22:03, Stanislav Malyshev wrote: Hi! So lets warm this up again. HEAD is for development .. so lets get this into HEAD so that it will be part of the next bigger PHP release for sure! Well, the code is sitting

RE: [PHP-DEV] Re: Flexible type hinting

2009-07-02 Thread Jonathan Bond-Caron
On Thu Jul 2 08:53 AM, Paul Biggar wrote: On Thu, Jul 2, 2009 at 1:43 PM, Ilia Alshanetskyi...@ilia.ws wrote: On 2-Jul-09, at 4:45 AM, Paul Biggar wrote: I think you might not have read what I suggested (it is different than the one I emailed to you privately). What you want is fully

RE: [PHP-DEV] Stream chunk size

2009-03-06 Thread Jonathan Bond-Caron
On Mon Mar 2 11:10 PM, Andi Gutmans wrote: I don't see a fundamental issue why it could not be arbitrary. The only challenge which may be an issue is that this code clearly allocates the buffer on the stack for what are probably performance reasons. If you allow arbitrary chunk size and use

[PHP-DEV] Stream chunk size

2009-03-02 Thread Jonathan Bond-Caron
Hi everyone, I have a question about streams and the maximum ‘chunk size’ of 8192. I’ve read README.STREAMS and found these slides by Wez: http://netevil.org/blog/2008/07/slides-php-streams While trying to write an Amazon S3 stream wrapper and I ran into an issue with large files:

RE: [PHP-DEV] Upgrading to internal DateTime

2008-12-09 Thread Jonathan Bond-Caron
On Sat Dec 6 12:09 AM, Lester Caine wrote: Derick Rethans wrote: ( Slipping a date through DateTime and returning it DATE_W3C seems to be adding the correct daylight saving details so far and allowing ADOdb date to work ) This is not the correct thing to do, as you will lose timezone

RE: [PHP-DEV] quick polls for 5.3

2008-11-13 Thread Jonathan Bond-Caron
On Wed Nov 12 02:14 PM, Lukas Kahwe Smith wrote: 1) ext/mhash in 5.3. ext/hash has all the functions, so the entire BC I) enable ext/hash by default +1 II) remove ext/mhash 0 2) deprecate ereg*. ext/ereg is an extension as of PHP 5.3. Since ext/ +1 3) resource constants (choose one) c

[PHP-DEV] PHP mixin RFC

2008-09-09 Thread Jonathan Bond-Caron
Hi Everyone, I've started a new RFC about PHP and mixins: http://wiki.php.net/rfc/mixin Stefan has done some really interesting research with traits though I'm concerned about how intuitive it is. Good summary of how mixins and traits deal with conflict here:

RE: [PHP-DEV] [RFC] [PATCH] Rounding in PHP

2008-09-04 Thread Jonathan Bond-Caron
On Thu Aug 28 01:47 PM, Christian Seiler wrote: Hi again, A few weeks ago I wrote quite a long posting to internals@ that tried to clarify the situation on the round() function in PHP. I was asked to write it up as an RFC in the wiki, which I have done: http://wiki.php.net/rfc/rounding

RE: [PHP-DEV] TracingPHP

2008-08-26 Thread Jonathan Bond-Caron
On Mon Aug 25 06:28 PM, steve wrote: Has anyone had success compiling PHP with LLVM? I haven't tried it, here is a good summary: http://llvm.org/devmtg/2008-08/Lopes_PHP-JIT-InTwoDays.pdf In short, it is 'slower' but that seems to be without any caching of the bytecode Bytecode is not

RE: [PHP-DEV] Re: Short syntax for array literals [...]

2008-05-29 Thread Jonathan Bond-Caron
It's a big +1 for me and this sums it up PHP is about building on the knowledge and experience of the typical target user. This target user changes slowly as we all get older and the industry we are in changes and we need to recognize that and adapt the language appropriately. What is

RE: [PHP-DEV] magic quotes finale

2008-05-20 Thread Jonathan Bond-Caron
+1 here A summary: PHP6 MUST not allow setting magic quotes PHP6 MUST trigger a fatal error when attempting to set magic quotes (php.ini or set_magic_quotes_runtime()) PHP6 MUST allow getting magic quotes info (always false) PHP5.3 MUST allow setting magic quotes PHP5.3 MUST trigger an

RE: [PHP-DEV] Float comparison

2008-05-04 Thread Jonathan Bond-Caron
BC break. However, perhaps the perfect shouldn't be the enemy of the good and we shouldn't let the inability to fix floats as array indices be a reason not to improve ==. - Todd On Fri, 2008-05-02 at 19:04 +0200, Pierre Joye wrote: On Fri, May 2, 2008 at 6:52 PM, Jonathan Bond-Caron [EMAIL

RE: [PHP-DEV] Float comparison

2008-05-04 Thread Jonathan Bond-Caron
);// 0,3 // expected: 0,3 echo \n; I'll dig more into the code... just thought I would share this (PHP 5.2.3) -Original Message- From: Stefan Walk [mailto:[EMAIL PROTECTED] Sent: May 4, 2008 1:31 PM To: Jonathan Bond-Caron Cc: internals

[PHP-DEV] Float comparison

2008-05-02 Thread Jonathan Bond-Caron
Hi, I'm new to the PHP internals list and I'm posting an issue I'm sure has been mentioned before -- float comparison I'd like to know if there are reasons not to change the default behavior when comparing floats. i.e. This would seem logical to me: $test =

RE: [PHP-DEV] Float comparison

2008-05-02 Thread Jonathan Bond-Caron
' thing. We get '1960', then converting back to a float, all accuracy bits are 0, so (numeric)$test == (double)1960 I would guess adding a new type is a big amount work? -Original Message- From: Pierre Joye [mailto:[EMAIL PROTECTED] Sent: May 2, 2008 1:05 PM To: Jonathan Bond-Caron Cc