Re: [PHP-DEV] [RFC] UString

2015-07-02 Thread "Ivan Enderlin"@Hoa
I fear it will be a reserved keyword. On 02/07/15 15:46, Andreas Heigl wrote: Hi. Am 02.07.15 um 15:43 schrieb "Ivan Enderlin"@Hoa: Hello :-), Just a small detail. Please, choose another name. The `Hoa\String` https://packagist.org/packages/hoa/string library has been renamed to `H

Re: [PHP-DEV] [RFC] UString

2015-07-02 Thread "Ivan Enderlin"@Hoa
Hello :-), Just a small detail. Please, choose another name. The `Hoa\String` https://packagist.org/packages/hoa/string library has been renamed to `Hoa\Ustring` because of PHP7. So, please, don't force us to rename the library again ;-). Moreover, this library provides an API that is useful

Re: [PHP-DEV] [RFC] Throwable Interface

2015-06-09 Thread Ivan Enderlin @ Hoa
Hello :-), At Hoa, we are totally in favor or this RFC. We tried to make our exception hierarchy compatible with PHP7 with success but it was very difficult to make it backward compatible. With this proposal, all our problems are going to be solved, so +1 for us! On 23/05/15 22:12, Aaron Pio

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-12 Thread Ivan Enderlin @ Hoa
On 12/02/15 14:21, Marcio Almada wrote: Thanks for the RFC! We discussed a little bit with the Hoa [1]'s and fruux [2]'s community and we have a question. Why not pretending we have an array of symbols, something like: use Foo\Bar\[Baz, Qux]; instead of use Foo\Bar\{Baz, Qux}; This is a

Re: [PHP-DEV][RFC][VOTE] Group Use Declarations

2015-02-12 Thread Ivan Enderlin @ Hoa
Hi Marcio, Thanks for the RFC! We discussed a little bit with the Hoa [1]'s and fruux [2]'s community and we have a question. Why not pretending we have an array of symbols, something like: use Foo\Bar\[Baz, Qux]; instead of use Foo\Bar\{Baz, Qux}; This is a list vs. block debate.

Re: [PHP-DEV] [VOTE] Scalar Type Hints

2015-02-09 Thread Ivan Enderlin @ Hoa
Hello internal, Thank you Andrea for this RFC. I voted today. However, I would like to stress that my vote represents the opinion of Hoa's community [1] and fruux [2] (the company behind sabre/dav [3]). I talked to Pierre Joye today and I was mentioning this is something we do since few mont

Re: [PHP-DEV] Design by Contract

2015-02-09 Thread Ivan Enderlin @ Hoa
On 06/02/15 09:44, Yasuo Ohgaki wrote: Hi Ivan, Hi Yasuo :-), On Fri, Feb 6, 2015 at 4:44 PM, Ivan Enderlin @ Hoa mailto:ivan.ender...@hoa-project.net>> wrote: On Thu, Feb 5, 2015 at 11:25 PM, Ivan Enderlin @ Hoa mailto:ivan.ender...@hoa-project.net>> wrote:

Re: [PHP-DEV] Design by Contract

2015-02-05 Thread Ivan Enderlin @ Hoa
On 06/02/15 05:00, Pierre Joye wrote: On Thu, Feb 5, 2015 at 11:36 PM, Dmitry Stogov wrote: phpdoc is annotation as well, but to split it into specific attributes we have to write specialized parsers. Other languages support annotation or attributes that may be used more easily. http://docs.h

Re: [PHP-DEV] Design by Contract

2015-02-05 Thread Ivan Enderlin @ Hoa
On 05/02/15 17:09, Yasuo Ohgaki wrote: Hi Ivan, Hi Yasuo :-), On Thu, Feb 5, 2015 at 11:25 PM, Ivan Enderlin @ Hoa mailto:ivan.ender...@hoa-project.net>> wrote: I just would like to point out some stuff. tl;dr: Contracts can be used to validate code (Design-by-Contract)

Re: [PHP-DEV] Design by Contract

2015-02-05 Thread Ivan Enderlin @ Hoa
Hi Internal :-), I just would like to point out some stuff. tl;dr: Contracts can be used to validate code (Design-by-Contract) or generate test data to validate code (Contract-based Testing). There are plenty of contract languages in the wild, each one addresses a specific problem (object, s

Re: [PHP-DEV] [RFC] Unicode Escape Syntax

2014-11-24 Thread Ivan Enderlin @ Hoa
Le 24/11/2014 23:09, Andrea Faulds a écrit : Good evening, Here’s a new RFC: https://wiki.php.net/rfc/unicode_escape It has a rationale section explaining why certain decisions were made, that I’d recommend you read in full. Excellent RFC, thank you for this proposal. I would suggest this tal

Re: [PHP-DEV] [RFC] Default constructors

2014-11-18 Thread Ivan Enderlin @ Hoa
Hello :-), Is it not simpler to create a super-object whom all objects are children of? Something similar to the Java `Object`? Cheers :-). Le 18/11/2014 10:20, Stanislav Malyshev a écrit : Hi! I'd like to propose the following RFC, which in short would allow any method to call parent ctor

Re: [PHP-DEV] [RFC][Vote] Return Types

2014-11-04 Thread Ivan Enderlin @ Hoa
Le 04/11/2014 09:37, Christoph Becker a écrit : Ivan Enderlin @ Hoa wrote: Excellent RFC, thank you. However, there is no mention about using `static`, `self` or `parent` as a type (it is possible for an argument). Something like: ```php class Singleton { public function getInstance

Re: [PHP-DEV] [RFC][Vote] Return Types

2014-11-04 Thread Ivan Enderlin @ Hoa
Le 04/11/2014 03:01, Levi Morrison a écrit : Dear Internals, I am pleased to announce that the return type RFC is now open for voting[1]. Note that the implementation needs a bit of cleaning up before merging should the RFC be accepted; Dmitry has already volunteered to help with that, but more

[PHP-DEV] Regression in RecursiveRegexIterator

2014-10-03 Thread Ivan Enderlin @ Hoa
Hello :-), Does anyone know something about this bug: https://bugs.php.net/bug.php?id=68128 ? Thanks! -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps

Re: [PHP-DEV] Using stada...@lists.php.net for spec work

2014-07-25 Thread Ivan Enderlin @ Hoa
On 25/07/2014 10:52, Sebastian Bergmann wrote: On 07/24/2014 09:13 PM, Sara Golemon wrote: Speaking of, I did just successfully subscribe myself to standards@ (without any trouble) using the direct ezmlm interface. Maybe they were using the web form on php.net? I dunno. Maybe it's just PEBKAC

Re: [PHP-DEV] PHP Language Specification

2014-07-25 Thread Ivan Enderlin @ Hoa
On 24/07/2014 15:40, Rowan Collins wrote: Ivan Enderlin @ Hoa wrote (on 24/07/2014): Taking the example of XML, CSS, HTML, ECMAScript or other languages (maybe the JVM, I don't know exactly), there is version numbers for the specification, that are different of the version numbers o

Re: [PHP-DEV] Using stada...@lists.php.net for spec work

2014-07-24 Thread Ivan Enderlin @ Hoa
On 24/07/2014 20:25, Andrea Faulds wrote: On 24 Jul 2014, at 19:24, Stas Malyshev wrote: Hi! I would like to propose to use list stada...@lists.php.net (which has been dormant since 2009) for PHP spec work. What do you think? Did you typo both your subject and body, or is the list actually c

Re: [PHP-DEV] PHP Language Specification

2014-07-24 Thread Ivan Enderlin @ Hoa
On 23/07/2014 22:59, Ben Ramsey wrote: This got me thinking about the whole version number debate. With a language specification, to what does the version number refer? The state of the language specification, or the state of a given implementation of the specification? Right now, the number

Re: [PHP-DEV] Re: PHP Language Specification

2014-07-23 Thread Ivan Enderlin @ Hoa
Hello Sara, First, thank you for the hard work. I have started to work on it few days ago as suggested in [1]. You have been faster than me ;-). Good job! On 23/07/2014 00:22, Sara Golemon wrote: On Tue, Jul 22, 2014 at 12:50 PM, Sara Golemon wrote: This document is meant for PHP, and PHP

Re: [PHP-DEV] VCS Account Request: hywan

2014-07-10 Thread Ivan Enderlin @ Hoa
On 10/07/2014 12:57, Ferenc Kovacs wrote: On Thu, Jul 10, 2014 at 12:01 PM, Ivan Enderlin @ Hoa mailto:ivan.ender...@hoa-project.net>> wrote: On 10/07/2014 11:27, Ferenc Kovacs wrote: On Thu, Jul 10, 2014 at 9:26 AM, Ivan Enderlin < ivan.ender...@hoa-pr

Re: [PHP-DEV] VCS Account Request: hywan

2014-07-10 Thread Ivan Enderlin @ Hoa
On 10/07/2014 11:27, Ferenc Kovacs wrote: On Thu, Jul 10, 2014 at 9:26 AM, Ivan Enderlin < ivan.ender...@hoa-project.net> wrote: Developing the PHP runtime Maintaining the documentation Translating the documentation Wiki access Wiki votes -- PHP Internals - PHP Runtime Development Mailing L

Re: [PHP-DEV] Implemented fallocate() syscall in streams

2014-07-10 Thread Ivan Enderlin @ Hoa
On 10/07/2014 11:13, Julien Pauli wrote: The difference between ftruncate and fallocate is meaningless in userland. If `fallocate` is proposed in the user-land, then it will be logical to have it in the stream wrapper API. That's it :-). I admit that it would be nice for consistency, however I

Re: [PHP-DEV] Implemented fallocate() syscall in streams

2014-07-08 Thread Ivan Enderlin @ Hoa
On 08/07/2014 11:08, Julien Pauli wrote: On Tue, Jul 8, 2014 at 9:37 AM, Ivan Enderlin @ Hoa wrote: On 13/06/2014 16:20, Julien Pauli wrote: - One that relies on ftruncate() , and adds a $use_fallocate flag https://github.com/jpauli/php-src/tree/fallocate_flag Please, note that the latest

Re: [PHP-DEV] Implemented fallocate() syscall in streams

2014-07-08 Thread Ivan Enderlin @ Hoa
On 13/06/2014 16:20, Julien Pauli wrote: Hi, Hello :-), I just wrote a patch to add fallocate() syscall support for streams. It relies on posix_fallocate(), so that it should support many Unixes. Linux's got a specification with a fallocate() function, more powerful than the posix call. fall

Re: [PHP-DEV] [VOTE] Uniform Variable Syntax

2014-07-07 Thread Ivan Enderlin @ Hoa
On 07/07/2014 16:54, Laruence wrote: On Mon, Jul 7, 2014 at 10:46 PM, Andrea Faulds wrote: On 7 Jul 2014, at 15:42, Laruence wrote: 1. "The current patch introduces a new “write context” issue. Namely ($foo)['bar'] = 'baz' will not behave this same was as $foo['bar'] = 'baz'. In the former c

[PHP-DEV] stream_get_contents does not like stream wrapper

2013-08-29 Thread Ivan Enderlin @ Hoa
Hi internal, I have met a strange behavior with stream_get_contents and stream wrapper. This is explained here: https://bugs.php.net/65581. Thoughts? -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.

Re: [PHP-DEV] [RFC] Syntax for variadic functions

2013-08-28 Thread Ivan Enderlin @ Hoa
On 28/08/13 17:47, Nikita Popov wrote: Hi internals! Hi Nikita :-), I'd like to propose an RFC, which adds dedicated syntax for variadic functions: https://wiki.php.net/rfc/variadics Basically this allows declaring variadics directly in the function signature, rather than fetching the

Re: [PHP-DEV] PHP 5.5.1 released

2013-07-19 Thread Ivan Enderlin @ Hoa
Congrats :-). On 19/07/13 10:26, Julien Pauli wrote: Hi internals, We just released PHP 5.5.1. This release includes bug fixes as well as a security fix. For changes in PHP 5.5.1, please consult the PHP 5 ChangeLog. Release Announcement: http://www.php.net/release_5_5_1.php

Re: [PHP-DEV] UNKNOW:0, what is it?

2013-06-27 Thread Ivan Enderlin @ Hoa
On 27/06/13 06:40, Laruence wrote: thanks for the report, fixed in https://github.com/php/php-src/commit/fa8611c81ee72839cdff3e72b18cc586feb4aa29 thanks Thank you! But it seems that it is a regression because I didn't have this bug before. How can I fix this in my code? Any idea? Cheers. --

Re: [PHP-DEV] UNKNOW:0, what is it?

2013-06-26 Thread Ivan Enderlin @ Hoa
On 26/06/13 18:30, Johannes Schlüter wrote: On Wed, 2013-06-26 at 18:21 +0200, Ivan Enderlin @ Hoa wrote: On 26/06/13 18:19, Johannes Schlüter wrote: On Wed, 2013-06-26 at 18:05 +0200, Ivan Enderlin @ Hoa wrote: Hello, Again, I have a segfault with RecursiveDirectoryIterator when I extend

Re: [PHP-DEV] UNKNOW:0, what is it?

2013-06-26 Thread Ivan Enderlin @ Hoa
On 26/06/13 18:19, Johannes Schlüter wrote: On Wed, 2013-06-26 at 18:05 +0200, Ivan Enderlin @ Hoa wrote: Hello, Again, I have a segfault with RecursiveDirectoryIterator when I extend it. This time, I have a very strange value on my SplFileInfo extension (subclass). When I var_dump the value

[PHP-DEV] UNKNOW:0, what is it?

2013-06-26 Thread Ivan Enderlin @ Hoa
Hello, Again, I have a segfault with RecursiveDirectoryIterator when I extend it. This time, I have a very strange value on my SplFileInfo extension (subclass). When I var_dump the value, I have UNKNOWN:0. This is not a string, not null, not false, just UNKNOW:0, without type. Any idea of wha

Re: [PHP-DEV] Internal object orientation documentation available!

2013-06-11 Thread Ivan Enderlin @ Hoa
Hi Nikita, Thank you (and Julien and Anthony) for this book. Really appreciated! On 10/06/13 20:33, Nikita Popov wrote: Hi internals! We just published some rather extensive documentation on internal object orientation: http://www.phpinternalsbook.com/classes_objects.html This is part

Re: [PHP-DEV] 5.NEXT Integer and String type modifications

2013-06-04 Thread Ivan Enderlin @ Hoa
On 04/06/13 12:08, Pierre Joye wrote: On Tue, Jun 4, 2013 at 10:41 AM, Ivan Enderlin @ Hoa wrote: Hey :-), On 02/06/13 08:52, Johannes Schlüter wrote: It would be a *gigantic* patch, but the userland effects should be minimal (the only changes would be supporting longer strings, and

Re: [PHP-DEV] 5.NEXT Integer and String type modifications

2013-06-04 Thread Ivan Enderlin @ Hoa
Hey :-), On 02/06/13 08:52, Johannes Schlüter wrote: It would be a *gigantic* patch, but the userland effects should be minimal (the only changes would be supporting longer strings, and consistent 64 bit int support). The performance considerations should be minimal for non-legacy code (as both

Re: [PHP-DEV] php-fpm and systemd integration

2013-05-18 Thread Ivan Enderlin @ Hoa
On 17/05/13 18:44, Remi Collet wrote: Hi, Hi, I plan to allow php-fpm to be aware of systemd and so, use the type=notify mode. I'd like to apply to attached patch to 5.4 and 5.5, as this change have no impact on standard build (need new --with-fpm-systemd build option). Any feedback before

[PHP-DEV] MultipleIterator, add a default value

2013-05-14 Thread Ivan Enderlin @ Hoa
Hi internals, I propose to ameliorate the MultipleIterator class. When a MultipleIterator instance has the MIT_NEED_ANY flag, and when one of the attached iterators has reached its end, the returned value is NULL. I propose to change this behavior by allowing a different default value. Exam

Re: [PHP-DEV] Proposed changes to PHP language

2013-03-06 Thread Ivan Enderlin @ Hoa
On 06/03/13 13:48, Max Romanovsky wrote: Dear PHP Community, Hi, I'd like to propose several changes to PHP core: 1. Allow re-throwing exceptions without losing original stack trace, like in other technologies: try {/*...*/} catch(Exception $e) { throw; } throw $e will do the jo

Re: [PHP-DEV] File system watcher/monitoring

2013-02-15 Thread Ivan Enderlin @ Hoa
On 15/02/13 14:29, Sebastian Krebs wrote: 2013/2/15 Ivan Enderlin @ Hoa On 15/02/13 14:20, Sebastian Krebs wrote: 2013/2/15 Ivan Enderlin @ Hoa Hi Stas, On 14/02/13 22:37, Stas Malyshev wrote: Hi! A missing feature in PHP is a file system watcher/monitoring available for

Re: [PHP-DEV] File system watcher/monitoring

2013-02-15 Thread Ivan Enderlin @ Hoa
On 15/02/13 14:20, Sebastian Krebs wrote: 2013/2/15 Ivan Enderlin @ Hoa Hi Stas, On 14/02/13 22:37, Stas Malyshev wrote: Hi! A missing feature in PHP is a file system watcher/monitoring available for almost all platforms. On Linux, we have inotify (available in PHP through pecl

Re: [PHP-DEV] File system watcher/monitoring

2013-02-15 Thread Ivan Enderlin @ Hoa
On 14/02/13 18:02, Paul Dragoonis wrote: On Thu, Feb 14, 2013 at 5:00 PM, Patrick ALLAERT wrote: 2013/2/14 Ivan Enderlin @ Hoa : I have written: “On Linux, we have inotify (available in PHP through pecl/inotify)”, so yup, I know for inotify :-). I propose to gather all these API and give a

Re: [PHP-DEV] File system watcher/monitoring

2013-02-15 Thread Ivan Enderlin @ Hoa
Hi Victor, On 15/02/13 12:43, Victor Berchet wrote: On 02/14/2013 03:03 PM, Ivan Enderlin @ Hoa wrote: Hi internal, A missing feature in PHP is a file system watcher/monitoring available for almost all platforms. On Linux, we have inotify (available in PHP through pecl/inotify), on Mac OS

Re: [PHP-DEV] File system watcher/monitoring

2013-02-14 Thread Ivan Enderlin @ Hoa
Hi Sebastian, On 14/02/13 15:40, Sebastian Krebs wrote: 2013/2/14 Ivan Enderlin @ Hoa Hello Julien, On 14/02/13 15:29, Julien Pauli wrote: On Thu, Feb 14, 2013 at 3:03 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: Hi internal, A missing feature in PHP is

Re: [PHP-DEV] File system watcher/monitoring

2013-02-14 Thread Ivan Enderlin @ Hoa
Hello Julien, On 14/02/13 15:29, Julien Pauli wrote: On Thu, Feb 14, 2013 at 3:03 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: Hi internal, A missing feature in PHP is a file system watcher/monitoring available for almost all platforms. On Linux, we have inotify (ava

Re: [PHP-DEV] File system watcher/monitoring

2013-02-14 Thread Ivan Enderlin @ Hoa
nux for the moment… Thank you again. --Mike On Feb 14, 2013, at 6:03 AM, Ivan Enderlin @ Hoa wrote: Hi internal, A missing feature in PHP is a file system watcher/monitoring available for almost all platforms. On Linux, we have inotify (available in PHP through pecl/inotify), on Mac OS

[PHP-DEV] File system watcher/monitoring

2013-02-14 Thread Ivan Enderlin @ Hoa
Hi internal, A missing feature in PHP is a file system watcher/monitoring available for almost all platforms. On Linux, we have inotify (available in PHP through pecl/inotify), on Mac OS X, we have /dev/fsevents (not available in PHP, since we need ioctl to do that in pure PHP —and sudo—, no C

Re: [PHP-DEV] [RFC] Improved Linux process title support in the CLI SAPI

2013-02-07 Thread Ivan Enderlin @ Hoa
Hi Keyur, On 07/02/13 06:40, Keyur Govande wrote: Hello, I've created a new RFC to improve support for setting a CLI process' title on Linux. It is based off of the PostgreSQL implementation and is more robust than the proctitle extension. More details and patch here: https://wiki.php.net/rfc

Re: [PHP-DEV] About PTY

2013-02-04 Thread Ivan Enderlin @ Hoa
On 04/02/13 19:37, Ferenc Kovacs wrote: On Mon, Feb 4, 2013 at 7:32 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: On 04/02/13 16:22, Ferenc Kovacs wrote: But is it possible to have PTY support today in PHP? These commits are from 2004, we are in 2013 now. May

Re: [PHP-DEV] About PTY

2013-02-04 Thread Ivan Enderlin @ Hoa
On 04/02/13 16:22, Ferenc Kovacs wrote: But is it possible to have PTY support today in PHP? These commits are from 2004, we are in 2013 now. Maybe new solutions are conceivable. Sure, I was just saying that we didn't had a working and mature solution back then which we removed later, but added

Re: [PHP-DEV] About PTY

2013-02-04 Thread Ivan Enderlin @ Hoa
On 30/01/13 12:53, Ferenc Kovacs wrote: wez turned that off 9 years ago: https://github.com/php/php-**src/commit/**bd818c0118ba406d82f901d4f97a13* *4727440df4 But why? Are arguments always valid today? Thanks.

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 15:35, Gustavo Lopes wrote: On Thu, 31 Jan 2013 14:55:26 +0100, Ivan Enderlin @ Hoa wrote: I'm not sure what you mean here. Each time you open a php://memory stream, you're working on a new "bucket", right? Yes exact. My bad. But my proposal still persi

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 12:18, Gustavo Lopes wrote: On Thu, 31 Jan 2013 10:37:53 +0100, Ivan Enderlin @ Hoa wrote: The php://memory, and its respectful sibling php://temp, appear very useful when we need to compute streams on-the-fly. They offer a lot of services, like avoiding HDD accesses, increasing

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 12:00, Sebastian Krebs wrote: 2013/1/31 Chris Wright I propose the following syntax: php://memory/ php://temp//maxmemory: I would very much like to see this as well. Would this also allow you to open multiple pointers to the same bucket? For example would this work?

Re: [PHP-DEV] Re: [lists.php] [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 11:12, ALeX wrote: Hi Ivan, php://memory/ php://temp//maxmemory: It's not that hard to write such an function in php. (http://www.php.net/manual/en/function.stream-wrapper-register.php). Did I say it was hard? This is quite obvious to write such a wrapper, but PHP has ph

Re: [PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
On 31/01/13 11:00, Attila Bukor wrote: Hi Ivan, Hi Attila, I've never actually worked with them, but it seems nice. However, we should make redirect php://memory and php://temp to php://memory/default and php://temp/default respectively to avoid break stuff imho. Obviously yes! Sorry, I miss

[PHP-DEV] Proposal: php://memory/ (& ://temp/)

2013-01-31 Thread Ivan Enderlin @ Hoa
Hi internals, The php://memory, and its respectful sibling php://temp, appear very useful when we need to compute streams on-the-fly. They offer a lot of services, like avoiding HDD accesses, increasing speed... and through a straightforward API /à la/ PHP, e.g. fopen('php://memory', 'r+'). H

Re: [PHP-DEV] About PTY

2013-01-30 Thread Ivan Enderlin @ Hoa
On 30/01/13 11:58, Ferenc Kovacs wrote: On Wed, Jan 30, 2013 at 11:51 AM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: Hi, I wonder if PHP supports PTY? I see old codes (from 2004 to 2010) using proc_open with $descriptors = [[0 => 'pty']] for example. Wh

[PHP-DEV] About PTY

2013-01-30 Thread Ivan Enderlin @ Hoa
Hi, I wonder if PHP supports PTY? I see old codes (from 2004 to 2010) using proc_open with $descriptors = [[0 => 'pty']] for example. When I try, I have an error because PTY seems to not be supported. ./configure does not propose me to --enable-pty as I have seen in some related posts. Than

Re: [PHP-DEV] [RFC] Integrating Zend Optimizer+ into the PHP distribution

2013-01-29 Thread Ivan Enderlin @ Hoa
On 29/01/13 09:30, Zeev Suraski wrote: [snip] (My guess is that it will show WP being slower and with a more dramatic improvement.) By the way, I just realized the % gain wasn't all that self-explanatory - it's vs. APC, not vs. plain PHP. I improved the doc to reflect both gains vs. plain PHP

Re: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-10 Thread Ivan Enderlin @ Hoa
Hi, My answer below. On 09/01/13 20:57, guilhermebla...@gmail.com wrote: Pierrick, before update v3 of patch, let's first clarify things that need to be discussed. Rasmus, you have no idea how happy you made me for a gentle comment pointing something we should think before propose a patch inste

Re: [PHP-DEV] - True Annotations

2013-01-09 Thread Ivan Enderlin @ Hoa
Hi internals, I would like to give you my thoughts about annotations. An annotation *must not change* the code *behavior* but add a useful *information* for the users or *tools*. The syntax used most of the time is very restrictive (such as Foo('Bar'), DateType('datetime'), MinLength(42) etc

Re: [PHP-DEV] Ruby's symbols

2013-01-05 Thread Ivan Enderlin @ Hoa
On 05/01/13 13:21, Nikita Popov wrote: [snip] If this is about memory savings, then I don't think it will help at all. PHP uses interned strings, so all those "label" etc strings in your above example actually use the same string value. The hash for those strings is also precomputed, so symbol do

Re: [PHP-DEV] Ruby's symbols

2013-01-05 Thread Ivan Enderlin @ Hoa
Hi :-), Nice proposal but I have few questions and remarks. My first question is how to delete symbols? I don't know if it is useful or not. We should discuss about that. Is `unset(:foo)` enough? How are they handled by the GC? Another question is: where are we able to use symbols? Is it all

Re: [PHP-DEV] Generators Revisited

2012-11-28 Thread Ivan Enderlin @ Hoa
Oh, and also : s/ calcualated/calculated/ s/extended_vallue/extended_value/ (always in the UPGRADING file). :-) On 28/11/12 11:57, Dmitry Stogov wrote: Hi I've tried to review the generators related changes made in PHP-5.5 and improve them from both consistency and performance points of vi

Re: [PHP-DEV] Generators Revisited

2012-11-28 Thread Ivan Enderlin @ Hoa
Hi Dmitry, s/ informatin/information in the UPGRADING file. Best regards. On 28/11/12 11:57, Dmitry Stogov wrote: Hi I've tried to review the generators related changes made in PHP-5.5 and improve them from both consistency and performance points of view. The patch also makes a small performa

Re: [PHP-DEV] DateTime::modify('now') is ignored, why?

2012-11-26 Thread Ivan Enderlin @ Hoa
On 26/11/12 13:02, Derick Rethans wrote: On Mon, 26 Nov 2012, Ivan Enderlin @ Hoa wrote: On 26/11/12 12:25, Sebastian Krebs wrote: 2012/11/26 Ivan Enderlin @ Hoa I would to modify a \DateTime object to the current time, thus I wrote this: $d = new \DateTime('+1 hour'); $d-&g

Re: [PHP-DEV] DateTime::modify('now') is ignored, why?

2012-11-26 Thread Ivan Enderlin @ Hoa
Hi Sebastien, On 26/11/12 12:25, Sebastian Krebs wrote: 2012/11/26 Ivan Enderlin @ Hoa Hi internals, I would to modify a \DateTime object to the current time, thus I wrote this: $d = new \DateTime('+1 hour'); $d->modify('now'); It did not work. Why? Because

Re: [PHP-DEV] DateTime::modify('now') is ignored, why?

2012-11-26 Thread Ivan Enderlin @ Hoa
ying the timestamp with another timestamp would make no sense to me. Kind regards, Chris van Dam Op 26-11-12 12:06 schreef Ivan Enderlin @ Hoa : Hi internals, I would to modify a \DateTime object to the current time, thus I wrote this: $d = new \DateTime('+1 hour'); $d->mo

[PHP-DEV] DateTime::modify('now') is ignored, why?

2012-11-26 Thread Ivan Enderlin @ Hoa
Hi internals, I would to modify a \DateTime object to the current time, thus I wrote this: $d = new \DateTime('+1 hour'); $d->modify('now'); It did not work. Why? Because the documentation (http://php.net/datetime.formats.relative) says: “Now - this is simply ignored”. Really? But the behavio

Re: [PHP-DEV] [RFC] ICU UConverter implementation for ext/intl

2012-10-29 Thread Ivan Enderlin @ Hoa
Very nice work. Bravo! On 30/10/12 02:57, Sara Golemon wrote: http://wiki.php.net/rfc/uconverter Discuss! -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria

Re: [PHP-DEV] mbstring, a proposition of additional functions

2012-09-25 Thread Ivan Enderlin @ Hoa
On 24/09/12 20:04, Andrew Faulds wrote: On 24/09/12 15:41, Ivan Enderlin @ Hoa wrote: Recently, I crafted a String object that support most of the propositions written here. Please, see https://github.com/hoaproject/String (file String.php). The code is very simple (it implies that it do not

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-25 Thread Ivan Enderlin @ Hoa
On 24/09/12 20:09, Andrew Faulds wrote: On 21/09/12 12:05, Ivan Enderlin @ Hoa wrote: Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application/x-www-form-encoded, then, it automatically parses the request body to populate an array in $_POST

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-24 Thread Ivan Enderlin @ Hoa
On 24/09/12 16:48, jpauli wrote: On Mon, Sep 24, 2012 at 4:21 PM, Ivan Enderlin @ Hoa wrote: On 21/09/12 16:16, jpauli wrote: On Fri, Sep 21, 2012 at 1:05 PM, Ivan Enderlin @ Hoa wrote: Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application

Re: [PHP-DEV] mbstring, a proposition of additional functions

2012-09-24 Thread Ivan Enderlin @ Hoa
Hi, I sent this email during this summer and nobody replied. I would like to know your opinion. On 06/08/12 21:54, Ivan Enderlin @ Hoa wrote: Hello, ext/mbstring is very useful, but from my point of view, some functions are missing. I would like to propose the addition of the following

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-24 Thread Ivan Enderlin @ Hoa
On 21/09/12 16:16, jpauli wrote: On Fri, Sep 21, 2012 at 1:05 PM, Ivan Enderlin @ Hoa wrote: Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application/x-www-form-encoded, then, it automatically parses the request body to populate an array in

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-21 Thread Ivan Enderlin @ Hoa
On 21/09/12 16:16, jpauli wrote: On Fri, Sep 21, 2012 at 1:05 PM, Ivan Enderlin @ Hoa wrote: Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application/x-www-form-encoded, then, it automatically parses the request body to populate an array in

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-21 Thread Ivan Enderlin @ Hoa
On 21/09/12 14:08, Ferenc Kovacs wrote: On Fri, Sep 21, 2012 at 1:57 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: On 21/09/12 13:44, Ferenc Kovacs wrote: On Fri, Sep 21, 2012 at 1:05 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: Hello, If

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-21 Thread Ivan Enderlin @ Hoa
On 21/09/12 13:44, Ferenc Kovacs wrote: On Fri, Sep 21, 2012 at 1:05 PM, Ivan Enderlin @ Hoa < ivan.ender...@hoa-project.net> wrote: Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application/x-www-form-encoded, then, it automatically pars

Re: [PHP-DEV] POST, content-type: application/json and json_decode

2012-09-21 Thread Ivan Enderlin @ Hoa
On 21/09/12 13:31, Starry Sky wrote: Hi, Hi, This may lead to a BC break. If the post body contains a variable with the same name in the JSON, the $_POST will be confusing. Can you give me an example please? -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. s

[PHP-DEV] POST, content-type: application/json and json_decode

2012-09-21 Thread Ivan Enderlin @ Hoa
Hello, If PHP receives a HTTP request with the method POST and with the header Content-Type: application/x-www-form-encoded, then, it automatically parses the request body to populate an array in $_POST. If the Content-Type is different (e.g. text/plain or application/json), the request body

Re: [PHP-DEV] RFC: alternative callback syntax

2012-09-20 Thread Ivan Enderlin @ Hoa
On 20/09/12 10:17, Pierre Joye wrote: hi, On Thu, Sep 20, 2012 at 10:09 AM, Ivan Enderlin @ Hoa wrote: On 19/09/12 19:41, Steve Clay wrote: On 9/19/12 9:26 AM, Ivan Enderlin @ Hoa wrote: callable is already a reserved word (T_CALLABLE). Oh, good. It's not listed here http://php.net/m

Re: [PHP-DEV] RFC: alternative callback syntax

2012-09-20 Thread Ivan Enderlin @ Hoa
On 19/09/12 20:21, Steve Clay wrote: On 9/19/12 2:01 PM, Andrew Faulds wrote: Some other ideas: $cb = (callable) $obj->bar; Ah, but (callable) that won't work for global functions, since (callable) is a cast, and (callable) is not usable as a cast (at least in 5.4.7): $a = (callable)'str';

Re: [PHP-DEV] RFC: alternative callback syntax

2012-09-20 Thread Ivan Enderlin @ Hoa
On 19/09/12 19:41, Steve Clay wrote: On 9/19/12 9:26 AM, Ivan Enderlin @ Hoa wrote: callable is already a reserved word (T_CALLABLE). Oh, good. It's not listed here http://php.net/manual/en/tokens.php Exactly. Who is responsible to update the documentation? Julien? Best regards. --

Re: [PHP-DEV] RFC: alternative callback syntax

2012-09-19 Thread Ivan Enderlin @ Hoa
On 19/09/12 15:15, Steve Clay wrote: On 9/19/12 2:37 AM, Sebastian Krebs wrote: 2012/9/19 Steve Clay mailto:st...@mrclay.org>> https://wiki.php.net/rfc/__alternative_callback_syntax reason I like 'Classname::class' for classes) I don't like, that functions will look like classes with a sta

Re: [PHP-DEV] PHP build-in HTTP server and the HEAD method

2012-09-12 Thread Ivan Enderlin @ Hoa
On 12/09/12 11:20, Sebastian Krebs wrote: Hi, Hi, As far as I can see everything works as expected: Because HEAD-requests should not send any content, you don't get any. Yup, as Damien said. Thank you. -- Ivan Enderlin Developer of Hoa http://hoa.42/ or http://hoa-project.net/ PhD. studen

Re: [PHP-DEV] PHP build-in HTTP server and the HEAD method

2012-09-12 Thread Ivan Enderlin @ Hoa
On 12/09/12 11:15, Damien Tournoud wrote: On Wed, Sep 12, 2012 at 10:54 AM, Ivan Enderlin @ Hoa wrote: Hello, It is probably me but it seems like the build-in HTTP server does not well support the HEAD method. Here is my following test case. First, the foo.php file: By definition, a

[PHP-DEV] PHP build-in HTTP server and the HEAD method

2012-09-12 Thread Ivan Enderlin @ Hoa
Hello, It is probably me but it seems like the build-in HTTP server does not well support the HEAD method. Here is my following test case. First, the foo.php file: /dev/null 2>&1 & $ # Test with POST. $ curl -v -X POST 127.0.0.1: * About to connect() to 127.0.0.1 port (

Re: [PHP-DEV] Moving to an AST-based parsing/compilation process

2012-09-06 Thread Ivan Enderlin @ Hoa
On 06/09/12 10:11, Stas Malyshev wrote: Hi! The lexing and parsing processes will not be slower than actual, and the construction of an AST is a new process. Well, as usual, new process requires new resources. But if we look further, it will certainly be a nice tool to perform better opcode ca

Re: [PHP-DEV] Moving to an AST-based parsing/compilation process

2012-09-06 Thread Ivan Enderlin @ Hoa
Hi Dmitry, On 06/09/12 07:37, Dmitry Stogov wrote: Hi Nikita, Personally, I don't see any reason to build AST. As you mentioned yourself, it will be slower and will require more memory. On the other hand AST itself would allow to perform only very basic optimizations. Most of them can be eas

Re: [PHP-DEV] Re: Moving to an AST-based parsing/compilation process

2012-09-06 Thread Ivan Enderlin @ Hoa
On 05/09/12 18:59, Andrew Faulds wrote: On 05/09/12 13:48, Morgan L. Owens wrote: I'm not a core dev, but I would like to add to the notes above that "third parties", such as myself, who want to do things with PHP source other than run it through a PHP interpreter would also appreciate such a

Re: [PHP-DEV] Moving to an AST-based parsing/compilation process

2012-09-05 Thread Ivan Enderlin @ Hoa
Hi, On 04/09/12 21:57, Nikita Popov wrote: Hey folks! Some people asked me what the advantages of using an AST-based parsing/compilation process are, so I put together a few quick notes in an RFC: https://wiki.php.net/rfc/ast_based_parsing_compilation_process It would be nice to get a few com

Re: [PHP-DEV] $obj->attr::method() is not allowed

2012-09-03 Thread Ivan Enderlin @ Hoa
On 03/09/12 17:20, Andrew Faulds wrote: On 03/09/12 16:20, Ivan Enderlin @ Hoa wrote: Absolutely. PHP has no AST? Why? For historical reasons? I believe so. Rasmus's original parser was not exactly world-class ;) Haha, ok ;-). Thanks. I thought it was a compiler related issue, now

Re: [PHP-DEV] $obj->attr::method() is not allowed

2012-09-03 Thread Ivan Enderlin @ Hoa
On 03/09/12 17:18, Andrew Faulds wrote: On 03/09/12 15:51, Ivan Enderlin @ Hoa wrote: I would like to know why? Is it a compiler related issue or just an omission? Would it be interesting to fix it? There are plenty of examples of this. One from my code: Can't do this: self::$

[PHP-DEV] $obj->attr::method() is not allowed

2012-09-03 Thread Ivan Enderlin @ Hoa
Hello, I would like to start with an example: a = new A(); } public function a ( ) { return $this->a; } public function f ( ) { return $this->a::foo(); } } $b = new B(); var_dump($b->f()); This is not possible. We

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-23 Thread Ivan Enderlin @ Hoa
On 23/08/12 16:36, Peter Nguyen wrote: Hi, Hi, AOP (http://en.wikipedia.org/wiki/Aspect-oriented_programming) when used correctly, can make your application really modular. I've seen several implementations but they all require compiling of code beforehand. There is however a PECL extension no

Re: [PHP-DEV] UTF-8 files and include

2012-08-22 Thread Ivan Enderlin @ Hoa
On 22/08/12 10:46, Pierre Joye wrote: On Wed, Aug 22, 2012 at 10:39 AM, Lester Caine wrote: Pierre Joye wrote: I'd also to ask to do not hijack this thread with a php6/whatever else rant and keep focusing on answering Ivan's questions instead. I would ask if any of this HAS changed in windows

Re: [PHP-DEV] UTF-8 files and include

2012-08-22 Thread Ivan Enderlin @ Hoa
On 22/08/12 10:16, Pierre Joye wrote: On Wed, Aug 22, 2012 at 9:04 AM, Ivan Enderlin @ Hoa wrote: As it may (very often) works smoothly on most unices, it won't work ever using current releases or master on Windows. One has to set the correct codepage and do the conversion from/to

Re: [PHP-DEV] UTF-8 files and include

2012-08-22 Thread Ivan Enderlin @ Hoa
On 22/08/12 08:57, Pierre Joye wrote: hi! On Tue, Aug 21, 2012 at 3:10 PM, Ivan Enderlin @ Hoa wrote: Hello, Some of my users & contributors have met an issue with files containing UTF-8 on certain Windows configurations (but they actually did not found the difference). Any idea why?

Re: [PHP-DEV] UTF-8 files and include

2012-08-21 Thread Ivan Enderlin @ Hoa
On 21/08/12 15:13, Rasmus Lerdorf wrote: On 08/21/2012 09:10 AM, Ivan Enderlin @ Hoa wrote: Hello, Some of my users & contributors have met an issue with files containing UTF-8 on certain Windows configurations (but they actually did not found the difference). Any idea why? The issue does

  1   2   >