Re: [PHP-DEV] Pointers to understanding code base

2015-02-07 Thread Benjamin Eberlei
On Sat, Feb 7, 2015 at 1:56 AM, Lester Caine wrote: > OK slowly getting back into raw code again ... > > Looking at imagick phpinfo problem ... > > > if (supported_formats) { > > for (i = 0; i < num_formats; i++) { > > smart_string_appends(&formats, > sup

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

2015-02-11 Thread Benjamin Eberlei
Forarding again, was rejected by the list because of spammy links :( -- Forwarded message -- From: Benjamin Eberlei Date: Thu, Feb 12, 2015 at 12:59 AM Subject: Re: [PHP-DEV] [VOTE] Scalar Type Hints To: Andrea Faulds Cc: Zeev Suraski , Rasmus Lerdorf , PHP Internals On Wed

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

2015-02-13 Thread Benjamin Eberlei
false alarm... it can restore > >> automatically. > >> > >> Yeah, declare() doesn't span files so that isn't a problem. > >> > >> My worry is still the lack of type coercion for internal calls. > > > > There's also some pretty inte

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

2015-02-13 Thread Benjamin Eberlei
On Fri, Feb 13, 2015 at 5:59 PM, Andrea Faulds wrote: > Hi, > > > On 13 Feb 2015, at 16:18, Benjamin Eberlei wrote: > > > > Wait i almost forgot, it *does* have an effect on me, especially around > callback handling: > > > > https://gist.git

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

2015-02-13 Thread Benjamin Eberlei
On Fri, Feb 13, 2015 at 5:50 PM, Nikita Popov wrote: > On Fri, Feb 13, 2015 at 5:24 PM, Nikita Popov > wrote: > > I'd like to follow up with another point. I've seen multiple people claim > that code that requires so many "use"s that this proposal becomes relevant > violates the single responsib

Re: [PHP-DEV] RFC: Expectations

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 10:37 AM, Joe Watkins wrote: > Morning internals, > > I've had mostly negative feedback on the design-by-contract idea, maybe > it's a step too far. > > The expectations RFC in its current form proposes that we introduce > zero-cost assertions, which are compatible

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: > hi, > > During discussion of different ways of implementing "Design by Contract" we > got an idea of using annotations. > > BTW: annotations are useful by their own and may be used for different > purposes. Support for annotations was propo

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
there seems to be a typo, requires is used in the annotation and requres is in the var_dump? > > Thanks. Dmitry. > > On Mon, Feb 16, 2015 at 2:36 PM, Benjamin Eberlei > wrote: > >> >> >> On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: >> >>>

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 1:10 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > > 2015-02-16 14:42 GMT+03:00 Dmitry Stogov : > >> the idea to not evaluate non-constant expressions at all, but just keep >> AST and provide interface to read it. >> PHP extensions should be able to use them

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 1:14 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > > 2015-02-16 15:12 GMT+03:00 Benjamin Eberlei : > >> but what is the API of an AST node and how does the visitor look like? > > > > I have a draft for that: >

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 1:17 PM, Pavel Kouřil wrote: > On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: > > hi, > > > > During discussion of different ways of implementing "Design by Contract" > we > > got an idea of using annotations. > > > > BTW: annotations are useful by their own and m

Re: [PHP-DEV] Annotations in PHP7

2015-02-16 Thread Benjamin Eberlei
On Mon, Feb 16, 2015 at 12:07 PM, Dmitry Stogov wrote: > hi, > > During discussion of different ways of implementing "Design by Contract" we > got an idea of using annotations. > > BTW: annotations are useful by their own and may be used for different > purposes. Support for annotations was propo

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Benjamin Eberlei
On Tue, Feb 17, 2015 at 9:22 AM, Rasmus Lerdorf wrote: > On 02/16/2015 09:48 PM, Sara Golemon wrote: > > Second, I should clarify that while the HHVM runtime performs > > coersion, the hack type checker is strict. So my original statement > > was inaccurate. As far as hack is concerned, it's si

Re: [PHP-DEV] [RFC] Exceptions in the engine

2015-02-17 Thread Benjamin Eberlei
On Tue, Feb 17, 2015 at 11:14 AM, Bob Weinand wrote: > > Am 14.02.2015 um 00:25 schrieb Nikita Popov : > > > > On Mon, Oct 6, 2014 at 11:53 PM, Nikita Popov > wrote: > > > >> Hi internals! > >> > >> During the PHP 5.6 development cycle I have proposed an RFC [1] that > >> suggested the use of ex

Re: [PHP-DEV] [RFC][Discussion] Parser extension API

2015-02-17 Thread Benjamin Eberlei
On Tue, Feb 17, 2015 at 12:46 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > Hello, internals! > > I want to introduce a RFC for providing a userland API for accessing an > Abstract Syntax Tree of the source code and to provide userland parser > hooks for source code modification: >

Re: [PHP-DEV] [RFC][Discussion] Parser extension API

2015-02-17 Thread Benjamin Eberlei
On Tue, Feb 17, 2015 at 1:22 PM, Alexander Lisachenko < lisachenko...@gmail.com> wrote: > > 2015-02-17 15:09 GMT+03:00 Benjamin Eberlei : > >> The visitor API is the essential part here and you left it out. > > > Yes, I decided not to put Visitor in the RFC (this w

Re: [PHP-DEV] Reviving scalar type hints

2015-02-17 Thread Benjamin Eberlei
On Tue, Feb 17, 2015 at 5:38 PM, Sara Golemon wrote: > On Tue, Feb 17, 2015 at 12:22 AM, Rasmus Lerdorf > wrote: > > On 02/16/2015 09:48 PM, Sara Golemon wrote: > >> Second, I should clarify that while the HHVM runtime performs > >> coersion, the hack type checker is strict. So my original stat

Re: [PHP-DEV] Annotations in PHP7

2015-02-18 Thread Benjamin Eberlei
On Wed, Feb 18, 2015 at 8:02 AM, Dmitry Stogov wrote: > > > On Wed, Feb 18, 2015 at 12:51 AM, guilhermebla...@gmail.com < > guilhermebla...@gmail.com> wrote: > >> François, >> >> Doctrine relies on nested annotations for a variety of mapping >> information. >> One example: >> >> >> http://doctrin

Re: [PHP-DEV] Annotations in PHP7

2015-02-18 Thread Benjamin Eberlei
On Wed, Feb 18, 2015 at 9:29 PM, Pavel Kouřil wrote: > On Wed, Feb 18, 2015 at 7:28 PM, guilhermebla...@gmail.com > wrote: > > Hi Dmitry, > > > >> Are you (and Doctrine team) interested in this annotation idea? > > > > I'd say that Benjamin nailed in our possible usage: > > > > > > class Foo {

Re: [PHP-DEV] Annotations in PHP7

2015-02-18 Thread Benjamin Eberlei
On Wed, Feb 18, 2015 at 9:40 PM, François Laupretre wrote: > Hi Guilherme, > > > De : guilhermebla...@gmail.com [mailto:guilhermebla...@gmail.com] > > > [ > > new OneToOne("Address"), > > new JoinColumn(default, default, default, default, "CASCADE") > > ] > > )> > > publi

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-21 Thread Benjamin Eberlei
Hi Zeev, On Sat, Feb 21, 2015 at 6:22 PM, Zeev Suraski wrote: > All, > > > > I’ve been working with François and several other people from internals@ > and the PHP community to create a single-mode Scalar Type Hints proposal. > > > > I think it’s the RFC is a bit premature and could benefit from

[PHP-DEV] The Game Theory of Scalar Type Hint Voting

2015-02-23 Thread Benjamin Eberlei
Hello, with two competing RFCs (has this ever happend before?) we are in an interesting spot now, game theoretically. Just letting both RFC authors open and close the votes will bias the votes just by nature of who starts first. My (potentially very wrong) armchair analysis of the timeline is (my

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-23 Thread Benjamin Eberlei
Zeev, On Sat, Feb 21, 2015 at 11:25 PM, Zeev Suraski wrote: > Benjamin, > > > > There’s a fundamental difference between the two RFCs that goes beyond > whether using a global INI setting and the other per-file setting. The > fundamental difference is that the endgame of the Dual Mode RFC is ha

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-23 Thread Benjamin Eberlei
On Mon, Feb 23, 2015 at 6:08 PM, Zeev Suraski wrote: > > -Original Message- > > From: Benjamin Eberlei [mailto:kont...@beberlei.de] > > Sent: Monday, February 23, 2015 6:54 PM > > To: Zeev Suraski > > Cc: PHP internals > > Subject: Re: [PHP

Re: [PHP-DEV] User perspective on STH

2015-02-23 Thread Benjamin Eberlei
On Mon, Feb 23, 2015 at 6:21 PM, Matthew Weier O'Phinney wrote: > On Mon, Feb 23, 2015 at 10:21 AM, Anthony Ferrara > wrote: > > > > And what about other languages that have exactly this behavior? Such > > as Go/Hack/Haskell/etc. Do you see casts everywhere? No. You see them > > where it needs

Re: [PHP-DEV] Coercive Scalar Type Hints RFC

2015-02-23 Thread Benjamin Eberlei
On Mon, Feb 23, 2015 at 7:09 PM, Zeev Suraski wrote: > > -Original Message- > > From: Benjamin Eberlei [mailto:kont...@beberlei.de] > > Sent: Monday, February 23, 2015 7:20 PM > > To: Zeev Suraski > > Cc: PHP internals > > Subject: Re: [PHP

Re: [PHP-DEV] Feature request and RFC

2015-02-24 Thread Benjamin Eberlei
Hi, On Tue, Feb 24, 2015 at 5:17 PM, Thomas Gielfeldt wrote: > Hi internals. > > I've made PR proposing a feature request: A new interface Sortable. > > https://github.com/php/php-src/pull/1116 > > If possible, I would like to create and RFC describing this in more detail, > and perhaps get a vo

Re: [PHP-DEV] Strict typing and callback vs declare()

2015-02-26 Thread Benjamin Eberlei
On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote: > Hi Anthony, > > What do you think about using a user level callback for strict type checks > instead of declare(). It won't allow changing behavior per file, but this > has its own cons and pros. > > set_strict_type_checker(function ($clas

Re: [PHP-DEV] Strict typing and callback vs declare()

2015-02-26 Thread Benjamin Eberlei
On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote: > > > On Thu, Feb 26, 2015 at 1:34 PM, Benjamin Eberlei > wrote: > >> >> >> On Thu, Feb 26, 2015 at 11:10 AM, Dmitry Stogov wrote: >> >>> Hi Anthony, >>> >>> What do you

Re: [PHP-DEV] Strict typing and callback vs declare()

2015-02-26 Thread Benjamin Eberlei
On Thu, Feb 26, 2015 at 12:24 PM, Dmitry Stogov wrote: > > > On Thu, Feb 26, 2015 at 2:09 PM, Benjamin Eberlei > wrote: > >> >> >> On Thu, Feb 26, 2015 at 11:56 AM, Dmitry Stogov wrote: >> >>> >>> >>> On Thu, Feb 26, 2015 at 1:

Re: [PHP-DEV] crypto_something

2015-02-26 Thread Benjamin Eberlei
On Thu, Feb 26, 2015 at 5:27 PM, Tom Worster wrote: > On 2/26/15, 11:07 AM, "Stefan Esser" wrote: > > >Hi, > > > >> libgcrypt does at least have a maintainer but it's poor > >> Werner Koch who is so destitute he lives on charity raised > >> on Kickstarter and has his work cut out just trying to

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
Zeev, On Fri, Feb 27, 2015 at 12:57 AM, Zeev Suraski wrote: > All, > > We've been working in the last few days to test and tune the Coercive STH > patch. I think the results are quite nice, and surprisingly better than > one might have expected. > Can we try the patch ourselves? I would love t

Re: [PHP-DEV] Follow-up to STH user experience, this time with actual testing

2015-02-27 Thread Benjamin Eberlei
Matthew, On Fri, Feb 27, 2015 at 1:29 AM, Matthew Weier O'Phinney wrote: > I've taken some time the last couple days to compile both the Scalare Type > Hints > v0.5 (heretofor STHv5) and Coercive Scalar Type Hints (heretofore > STHcoerce) > patches and test some code against them. > > In each ca

Re: [PHP-DEV] BC break between PHP 5.6.5 and PHP 5.6.6

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 9:20 AM, Leigh wrote: > On 27 February 2015 at 08:06, Sebastian Bergmann > wrote: > > While working on PHPUnit today I noticed one test of its own test > > suite failing on PHP 5.6.6 that passes on PHP 5.6.5. The details of > > this can be found at > > > >https://g

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
ss to collect and fix this over time. Now every company needs this process for every project they have out there. And the typical agency has hundrets/thousands of drupal, typo3, wordpress installations out there. > > > Thanks. Dmitry. > > On Fri, Feb 27, 2015 at 11:03 AM, Benj

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 12:18 PM, Benjamin Eberlei wrote: > > > On Fri, Feb 27, 2015 at 9:44 AM, Dmitry Stogov wrote: > >> I've added the link to the patch >> >> https://github.com/php/php-src/pull/1125/files >> > > Thanks! > > First, the n

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 2:37 PM, Damien Tournoud wrote: > Hi Zeev, > > On Fri, Feb 27, 2015 at 12:57 AM, Zeev Suraski wrote: > > > Drupal homepage: One new E_DEPRECATED warning, which seems to catch a > > real bug, or at least faulty looking code: > > $path = trim($path, '/'); // raises E_DE

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 2:37 PM, Damien Tournoud wrote: > Hi Zeev, > > On Fri, Feb 27, 2015 at 12:57 AM, Zeev Suraski wrote: > > > Drupal homepage: One new E_DEPRECATED warning, which seems to catch a > > real bug, or at least faulty looking code: > > $path = trim($path, '/'); // raises E_DE

Re: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 2:57 PM, Lester Caine wrote: > On 27/02/15 13:45, Benjamin Eberlei wrote: > >>> Drupal admin interface (across the all pages): One new E_DEPRECATED > >>> > > warning, which again seems to catch a real bug - stripslsahes() &

Re: [PHP-DEV] Follow-up to STH user experience, this time with actual testing

2015-02-27 Thread Benjamin Eberlei
On Fri, Feb 27, 2015 at 4:25 PM, Sebastian Bergmann wrote: > Am 27.02.2015 um 01:29 schrieb Matthew Weier O'Phinney: > > - PHPUnit passes a boolean false to `debug_backtrace()`... which is > documented > > as expecting an integer! (There are actually several constant values it > > accepts, al

Re: [PHP-DEV] Re: A plea for unity on scalar types

2015-03-13 Thread Benjamin Eberlei
On Fri, Mar 13, 2015 at 7:04 PM, Maciej Sobaczewski wrote: > Currently Scalar Type Declarations are going to fall. We have 33 No votes > and I really wonder why there is almost no justification for them. I know > that it's not required, but it is a matter of good taste in whole voting > proces. >

Re: [PHP-DEV] [RFC] Basic Scalar Types

2015-03-13 Thread Benjamin Eberlei
On Fri, Mar 13, 2015 at 9:44 PM, Zeev Suraski wrote: > > -Original Message- > > From: Derick Rethans [mailto:der...@php.net] > > Sent: Friday, March 13, 2015 10:34 PM > > To: guilhermebla...@gmail.com; Stelian Mocanita > > Cc: Eli; PHP Internals List > > Subject: Re: [PHP-DEV] [RFC] Basic

Re: [PHP-DEV] A plea for unity on scalar types

2015-03-13 Thread Benjamin Eberlei
On Sat, Mar 14, 2015 at 12:02 AM, Arvids Godjuks wrote: > пт, 13 Мар 2015, 23:01, Philip Sturgeon : > > > Pavel, > > > > On Fri, Mar 13, 2015 at 3:38 PM, Pavel Kouřil > wrote: > > > On Fri, Mar 13, 2015 at 4:45 PM, Anthony Ferrara > > wrote: > > >> > > >> But for today, I firmly believe that th

Re: [PHP-DEV] [RFC][Accepted] Scalar Type Declarations V0.5

2015-03-18 Thread Benjamin Eberlei
On Wed, Mar 18, 2015 at 4:28 PM, Chris Wright wrote: > On 18 March 2015 at 13:12, Pavel Kouřil wrote: > > > On Wed, Mar 18, 2015 at 2:02 PM, Nikita Nefedov > > wrote: > > > On 18 Mar 2015 15:52, "Pavel Kouřil" wrote: > > >> > > >> Hello, > > >> > > >> I made that conclusion because in the firs

Re: [PHP-DEV] RFC: Nested enclosing returns

2015-03-21 Thread Benjamin Eberlei
On Sat, Mar 21, 2015 at 1:13 PM, Georges.L wrote: > Hi php internals, > > After some long and deep research i finally decided to write my first RFC > about a feature i'd be interested to be improved in the php core: *Nested > enclosing returns* > > > The main purpose, as the title say, is to have

Re: [PHP-DEV] New RFC draft "static class constructor"

2015-04-13 Thread Benjamin Eberlei
What would happen if you "call the parent constructor": class A extends B { static public function __static() { B::__static(); } } On Mon, Apr 13, 2015 at 5:23 PM, Johannes Schlüter wrote: > Hi, > > On Mon, 2015-04-13 at 15:37 +0200, Johannes Ott wrote: > > finally I managed to do

Re: [PHP-DEV] Fixing bundled extension version mess

2015-04-15 Thread Benjamin Eberlei
On Wed, Apr 15, 2015 at 1:01 PM, François Laupretre wrote: > > De : Pierre Joye [mailto:pierre@gmail.com] > > > > What do you think to simply use the PHP version number instead of some > > outdated (most of the time) version for all bundled extensions? > > As the idea is that extensions avail

Re: [PHP-DEV] PDO Oracle driver

2015-04-22 Thread Benjamin Eberlei
On Wed, Apr 22, 2015 at 12:24 PM, Peter Cowburn wrote: > cc-ing doc list > > On 22 April 2015 at 10:40, Stelian Mocanita > wrote: > > > Hello internals, > > > > I would like to ask what on your thoughts on removing the Oracle drive > for > > PDO from the documentation (http://us1.php.net/manual/

Re: [PHP-DEV] Re: PDO Oracle driver

2015-04-23 Thread Benjamin Eberlei
On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks wrote: > PDO is everywhere. Doctrine? Based on PDO. You can use mysqli, oci8 or sqlsrv for example without problems in Doctrine. Exposing some of the internal api of PDO as php functions (SQL Parser) I would bet it is possible to reimplement PDO

Re: [PHP-DEV] Re: PDO Oracle driver

2015-04-24 Thread Benjamin Eberlei
On Fri, Apr 24, 2015 at 8:16 AM, Arvids Godjuks wrote: > 2015-04-24 4:42 GMT+03:00 Benjamin Eberlei : > >> On Thu, Apr 23, 2015 at 3:45 PM, Arvids Godjuks > > >> wrote: >> >> > PDO is everywhere. Doctrine? Based on PDO. >> >> >> You can u

Re: [PHP-DEV] Re: [RFC] Improved Error Callback Mechanism

2015-04-24 Thread Benjamin Eberlei
On Fri, Apr 24, 2015 at 12:24 PM, Olivier Garcia wrote: > Greetings Internals, > > A few weeks ago, Patrick (patrickalla...@php.net) and I wrote a RFC > [1] to improve the error callback mechanism and we just submitted a > patch [2] - mostly written by Patrick - for review. > > Since our patch on

Re: [PHP-DEV] Re: [RFC] Reserving More Types in PHP 7

2015-04-27 Thread Benjamin Eberlei
On Mon, Apr 27, 2015 at 6:44 AM, Stanislav Malyshev wrote: > Hi! > > > Well, it looks to me like all the discussion is around preventing > > class and namespace names like “string”, “float”, etc. Granted, PHP > > class names are case-insensitive, but how hard would it be to reserve > > these in a

Re: [PHP-DEV] JsonSerializable New Interface method Proposal

2015-07-13 Thread Benjamin Eberlei
On Mon, Jul 13, 2015 at 3:22 PM, Dean Eigenmann wrote: > Ive just opened a new RFC https://wiki.php.net/rfc/jsonserializable regarding > Json to Object unserialization. > The approach with typecasting will not work, because the function json_decode doesn't have that information. Instead somethi

Re: [PHP-DEV] Consolidation of Traversable and array operations

2015-07-15 Thread Benjamin Eberlei
On Wed, Jul 15, 2015 at 9:53 PM, Rowan Collins wrote: > On 15 July 2015 20:39:05 GMT+01:00, Levi Morrison wrote: > >Do note that the union types RFC would also alleviate some of this > >pain for user-land functions, since `array | Traversable` would cover > >the required access pattern. I think

[PHP-DEV] Wiki Permissions and phpng-upgrading

2015-07-24 Thread Benjamin Eberlei
Hi everyone, i started porting an extension today and scimmed the phpng-upgrading file. It has some inaccuracies already with changes after the phpng-merge. However my access rights are not enough for user (beberlei) getting a "Read Only" notice. Could I have permission to edit this page? Also w

Re: [PHP-DEV] Re: PHP 5.4 Benchmarks

2012-02-05 Thread Benjamin Eberlei
You cannot use Travis CI to compare for runtime of php5.4 and 5.3 since the used boxes are propably either different and also under high load due to virtualization, but you can check for memory differences. And they are huge: Doctrine 2: 5.3: http://travis-ci.org/#!/doctrine/doctrine2/jobs/593850

Re: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and references)

2012-04-24 Thread Benjamin Eberlei
Hi! would it be possible to add a second shorthand syntax to the complete automatic implementation? Examples: class TimePeriod { public $Hours {}; public property $Hours; public $Hours {property}; } That could save quite some typing. Overall, i really like it. On Tue, Apr 24, 2012

Re: [PHP-DEV] BreakIterator

2012-06-01 Thread Benjamin Eberlei
How about IntlBreakIterator? I agree with David that the naming is very weird, it doesn't hint at something from Intl but another crazy spl iterator :-) On Fri, Jun 1, 2012 at 9:57 AM, Gustavo Lopes wrote: > On Fri, 01 Jun 2012 09:40:19 +1000, David Muir wrote: > >> Coming from a "pleb", my only

Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings

2012-06-27 Thread Benjamin Eberlei
On Wed, Jun 27, 2012 at 1:41 AM, Stas Malyshev wrote: > Hi! > > > Makes sense to me. So should I do this? Remove warnings + add string > > parameter for json_last_error? > I think its weird that the parameter is called $error_string and setting it to true means returning an array. Why not in the

Re: [PHP-DEV] RFC: Property get/set syntax

2012-06-28 Thread Benjamin Eberlei
What is the state here with regard to merge into php-src? On Sun, Apr 22, 2012 at 5:48 AM, Clint M Priest wrote: > > > > -Original Message- > > From: Stas Malyshev [mailto:smalys...@sugarcrm.com] > > Sent: Saturday, April 21, 2012 10:33 PM > > To: Clint M Priest > > Cc: internals@lists.p

Re: [PHP-DEV] Decorators Revisited

2012-08-13 Thread Benjamin Eberlei
Just seeing my previous reply only went to Anthony in person. so i have to repeat here: Its an awesome idea, i really like it :) On Mon, Aug 13, 2012 at 9:10 PM, Jordi Boggiano wrote: > Heya, > > > What do you think? Is this a route that I should continue down? Or is > there > > something funda

Re: [PHP-DEV] Decorators Revisited

2012-08-14 Thread Benjamin Eberlei
On Tue, Aug 14, 2012 at 8:36 AM, Stas Malyshev wrote: > Hi! > > > 2. Move instanceof to a handler from the current standalone function. > Then > > each (pecl level) class could choose its own implementation if it is > > needed. The function could still exist for BC reasons, but would proxy to > >

[PHP-DEV] BC Break in PHP 5.3.16 Reflection API

2012-08-23 Thread Benjamin Eberlei
I get reports from Doctrine users, that apparently the Reflection API is broken in 5.3.16 and everything else than BC: https://bugs.php.net/bug.php?id=62715 Has been closed, but wrongly. Can this be opened up and handled? Or is a follow up bug appropriate here?

Re: [PHP-DEV] RFC for Adding __toString to DateTime

2012-09-02 Thread Benjamin Eberlei
I think allowing to change teh default format would be horrible. If libraries (such as Doctrine would) use this internally, they are at the will of users not to fiddle with this setting. Not to speak about libraries that contradict each other. If there was a format, it would have to be constant im

Re: [PHP-DEV] RFC for Adding __toString to DateTime

2012-09-03 Thread Benjamin Eberlei
as i said above, a global option will make this feature completly unusable for libraries. For Doctrine we would really like to have __toString() for datetime primary keys (identity map), but we need a reliable stable lossless format that can never change. On Mon, Sep 3, 2012 at 2:01 PM, Will Fitc

[PHP-DEV] DOMDocument Extension: Output current nodelist

2008-07-29 Thread Benjamin Eberlei
Hello, this is my first posting and first patch proposal, so please be kind :) I recognized at work today that DOMDocument has two function saveHTML and saveHTMLFile, but only a save function for the "unfiltered" xml node structure to save to a file although libxml provides the functionality to ex

[PHP-DEV] DOMDocument Extension: Output current node list

2008-07-29 Thread Benjamin Eberlei
xtNode('This is the title'); $text = $title->appendChild($text); echo $doc->output(); ?> -- Benjamin Eberlei http://www.beberlei.de 128a129 > PHP_FUNCTION(dom_document_output); 148a149,152 > ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_output, 0, 0, 0) > ZEND_END_ARG_INFO

Re: [PHP-DEV] DOMDocument Extension: Output current nodelist

2008-07-29 Thread Benjamin Eberlei
üter wrote: > On Wed, 2008-07-30 at 00:23 +0200, Benjamin Eberlei wrote: > > I recognized at work today that DOMDocument has two function saveHTML and > > saveHTMLFile, but only a save function for the "unfiltered" xml node > > structure to save to a file alt

Re: [PHP-DEV] RFC: Move phpng to master

2014-07-21 Thread Benjamin Eberlei
On Mon, Jul 21, 2014 at 12:41 PM, Dmitry Stogov wrote: > Hi Matteo, > > We have very limited forces to test everything. Once we we have bug reports > we may look into the problems and fix them. > Wouldn't it be super easy to use the HHVM team infrastructure to test a version against various PHP

Re: [PHP-DEV] RFC: Move phpng to master

2014-07-22 Thread Benjamin Eberlei
On Tue, Jul 22, 2014 at 10:45 AM, Pierre Joye wrote: > hi, > > On Tue, Jul 22, 2014 at 9:52 AM, Zeev Suraski wrote: > > > I stand by my statement that I'm > > sure a great deal of users (my guesstimate - the majority) would happily > > upgrade to PHP.NEXT even if the huge performance gains wer

Re: [PHP-DEV] RFC: Move phpng to master

2014-07-22 Thread Benjamin Eberlei
On Tue, Jul 22, 2014 at 11:32 AM, Pierre Joye wrote: > On Tue, Jul 22, 2014 at 11:18 AM, Benjamin Eberlei > wrote: > > > This is the opportunity to do the cleanup now, based on phpng branch. > Since > > the branch is pulic on Github, how is development secret? > &

Re: [PHP-DEV] RFC: Move phpng to master

2014-07-26 Thread Benjamin Eberlei
In that case tthe voting RFC should be improved. The sentence about 1/2 vs 2/3 votes is really ambiguous. Not fixing it will always lead to discussions over and over again. On Sun, Jul 27, 2014 at 12:32 AM, Andrea Faulds wrote: > > On 26 Jul 2014, at 23:16, Zeev Suraski wrote: > > > *“**Given

Re: [PHP-DEV] Re: [VOTE] Abstract Syntax Tree

2014-08-25 Thread Benjamin Eberlei
On Tue, Aug 26, 2014 at 1:12 AM, Stas Malyshev wrote: > Hi! > > > This is something that Nikita had originally proposed in an RFC > > (https://wiki.php.net/rfc/engine_exceptions) but postponed until after > 5.6. > > > > I have a feeling we'll be hearing about its resurrection soon enough. > > 5.6

Re: [PHP-DEV] Annotation PHP 7

2014-11-04 Thread Benjamin Eberlei
On Tue, Nov 4, 2014 at 11:28 AM, Pierre Joye wrote: > On Tue, Nov 4, 2014 at 4:21 PM, Stas Malyshev > wrote: > > Hi! > > > >> As I do consider personal tastes important, there are times where we > should > >> listen to our users. > > > > It would be nice to take "paving the walkways" approach, b

Re: [PHP-DEV] Annotation PHP 7

2014-11-04 Thread Benjamin Eberlei
On Tue, Nov 4, 2014 at 12:20 PM, Pierre Joye wrote: > > On Nov 4, 2014 8:54 PM, "Benjamin Eberlei" wrote: > > > > On Tue, Nov 4, 2014 at 11:28 AM, Pierre Joye > wrote: > >> > >> On Tue, Nov 4, 2014 at 4:21 PM, Stas Malyshev > wrote: > &

Re: [PHP-DEV] Annotation PHP 7

2014-11-05 Thread Benjamin Eberlei
I think keeping this just like an array definition in a property would make this both simple and flexible. You can even improve on Marcos example with a class having constants: namespace Doctrine\ORM\Mapping\Annotations; class ORM { const ENTITY = 'Doctrine\ORM\Mapping\Annotations\Entity';

[PHP-DEV] [RFC] Turn gc_collect_cycles into a function pointer

2014-12-04 Thread Benjamin Eberlei
Good morning, This is just a very small change, I propose this RFC for discussion to turn the C function "gc_collect_cycles" into a pointer. https://wiki.php.net/rfc/gc_fn_pointer Composer's garbage collection optimization showed that PHP Profilers fail to capture the dynamics of GC and we need

Re: [PHP-DEV] [RFC] Turn gc_collect_cycles into a function pointer

2014-12-04 Thread Benjamin Eberlei
On Thu, Dec 4, 2014 at 3:26 PM, Ferenc Kovacs wrote: > > > On Thu, Dec 4, 2014 at 1:17 PM, Julien Pauli wrote: > >> On Thu, Dec 4, 2014 at 12:39 PM, Ferenc Kovacs wrote: >> > >> > >> > On Thu, Dec 4, 2014 at 11:53 AM, Julien Pauli wrote: >>

Re: [PHP-DEV] [RFC] Turn gc_collect_cycles into a function pointer

2014-12-10 Thread Benjamin Eberlei
c 4, 2014 at 12:39 PM, Ferenc Kovacs wrote: >> > >> > >> > On Thu, Dec 4, 2014 at 11:53 AM, Julien Pauli wrote: >> >> >> >> On Thu, Dec 4, 2014 at 9:30 AM, Benjamin Eberlei >> >> wrote: >> >> > Good morning, >&g

[PHP-DEV] [RFC] Extension Prepend Files

2015-01-04 Thread Benjamin Eberlei
Hey everyone, I want to open discussion on my RFC to strengthen the ability of extensions to provide functionality to developers in both C **and** PHP code. For this extensions can add PHP files to a list of "prepend files" that are part of every request execution exactly the same way the INI aut

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-04 Thread Benjamin Eberlei
On Sun, Jan 4, 2015 at 1:36 PM, François Laupretre wrote: > > De : Benjamin Eberlei [mailto:kont...@beberlei.de] > > I want to open discussion on my RFC to strengthen the ability of > extensions > > to provide functionality to developers in both C **and** PHP code. > &

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-04 Thread Benjamin Eberlei
> > On 4 January 2015 at 19:52, Benjamin Eberlei wrote: > >> Hey everyone, >> >> I want to open discussion on my RFC to strengthen the ability of >> extensions >> to provide functionality to developers in both C **and** PHP code. >> >> For this ex

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-05 Thread Benjamin Eberlei
On Mon, Jan 5, 2015 at 3:02 PM, Pierre Joye wrote: > Hi, > > On Jan 4, 2015 6:52 PM, "Benjamin Eberlei" wrote: > > > > Hey everyone, > > > > I want to open discussion on my RFC to strengthen the ability of > extensions > > to provide fu

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-06 Thread Benjamin Eberlei
On Tue, Jan 6, 2015 at 12:24 PM, Derick Rethans wrote: > On Mon, 5 Jan 2015, Stanislav Malyshev wrote: > > > > 2) Embedded text sections. It's possible to place the raw PHP code > > > into the compiled .so/.dylib/.dll file and fetch it out for > > > compilation at runtime. This enables easy bun

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-06 Thread Benjamin Eberlei
On Tue, Jan 6, 2015 at 3:50 PM, Pierre Joye wrote: > > On Jan 6, 2015 9:20 PM, "François Laupretre" wrote: > The whole code to consider as part of an extension, whatever the language, > must be kept in sync. And the best way to achieve this is to store it in a > single file. > > I would rather s

[PHP-DEV] [RFC][VOTE] Turn gc_collect_cycles into function pointer

2015-01-07 Thread Benjamin Eberlei
Hello everyone, After discussion I am putting the RFC on turning gc_collect_cycles into a function pointer to vote: https://wiki.php.net/rfc/gc_fn_pointer Votes will end on 2015-01-21 19:31 (in 14 days). The discussion feedback on PHP 7 extension API refactoring was incorporated in the RFC with

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-08 Thread Benjamin Eberlei
On Wed, Jan 7, 2015 at 11:14 PM, François Laupretre wrote: > > De : Pierre Joye [mailto:pierre@gmail.com] > > > > ... here, > > it is proposed to bundle scripts that will be executed at runtime like > any > > other script, except that nothing can be done with them, not even disable > > them i

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-08 Thread Benjamin Eberlei
level stream functions for example. On Thu, Jan 8, 2015 at 12:43 PM, Pierre Joye wrote: > hi, > > On Thu, Jan 8, 2015 at 3:41 AM, Benjamin Eberlei > wrote: > > > > > > On Wed, Jan 7, 2015 at 11:14 PM, François Laupretre < > franc...@tekwire.net> > >

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-08 Thread Benjamin Eberlei
On Thu, Jan 8, 2015 at 1:08 PM, Remi Collet wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Le 04/01/2015 12:52, Benjamin Eberlei a écrit : > > > https://wiki.php.net/rfc/extension_prepend_files > > Sorry but definitively seems a bad idea. > >

Re: [PHP-DEV] [RFC] Extension Prepend Files

2015-01-11 Thread Benjamin Eberlei
On Sat, Jan 10, 2015 at 9:16 AM, Pierre Joye wrote: > On Sun, Jan 4, 2015 at 3:52 AM, Benjamin Eberlei > wrote: > > Hey everyone, > > > > I want to open discussion on my RFC to strengthen the ability of > extensions > > to provide functionality to deve

Re: [PHP-DEV] Re: Top 10 Pecl extensions PHP7 compatibility

2015-01-15 Thread Benjamin Eberlei
Not sure how that helps, since you would tag versions anyways using semver, so if there is a master vs next/phpng branch, then they might still result in two tags v1.0 and v2.0 and there is no way to automatically resolve this. On Thu, Jan 15, 2015 at 3:48 PM, Jan Ehrhardt wrote: > Julien Pauli

Re: [PHP-DEV] Re: Top 10 Pecl extensions PHP7 compatibility

2015-01-15 Thread Benjamin Eberlei
On Thu, Jan 15, 2015 at 4:11 PM, Jan Ehrhardt wrote: > Benjamin Eberlei in php.internals (Thu, 15 Jan 2015 15:53:43 +0100): > >Not sure how that helps, since you would tag versions anyways using > semver, > >so if there is a master vs next/phpng branch, then they might stil

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-01-15 Thread Benjamin Eberlei
On Thu, Jan 15, 2015 at 4:25 PM, Pavel Kouřil wrote: > On Thu, Jan 15, 2015 at 4:11 PM, Jordi Boggiano > wrote: > > > > Reading the thread at this point shows so much confusion, it seems half > the > > people reading the spec misunderstood that the declare() line affects > > function calls only

Re: [PHP-DEV] [RFC] Scalar Type Hints v0.2

2015-01-16 Thread Benjamin Eberlei
On Fri, Jan 16, 2015 at 11:08 AM, Lester Caine wrote: > On 15/01/15 15:28, Niktia Nefedov wrote: > >> Consider what a mess was register_globals and problems it had, but at > >> least > >> it was a global setting. Declare will work on per file basis, and it > will > >> end up even more of a mess.

[PHP-DEV] Re: [RFC][VOTE] Turn gc_collect_cycles into function pointer

2015-01-22 Thread Benjamin Eberlei
On Wed, Jan 7, 2015 at 8:33 PM, Benjamin Eberlei wrote: > Hello everyone, > > After discussion I am putting the RFC on turning gc_collect_cycles into a > function pointer to vote: > > https://wiki.php.net/rfc/gc_fn_pointer > > Votes will end on 2015-01-21 19:31 (in 14 d

Re: [PHP-DEV] PHP7 Homework for everyone reading this list

2015-01-22 Thread Benjamin Eberlei
On Thu, Jan 22, 2015 at 7:32 PM, Levi Morrison wrote: > > I had to quarantine a couple of tests in Doctrine and PHPUnit as they > both > > depend on the re-usage of the hashes returned by spl_object_hash(), which > > shouldn't actually be depended upon (am I right dmitry?). > > I'm not Dmitry, bu

Re: [PHP-DEV] Proposal: Raise severity of undefined constants

2015-01-28 Thread Benjamin Eberlei
On Tue, Jan 27, 2015 at 11:21 PM, Rowan Collins wrote: > Hi All, > > I would like to propose that the error given for an undefined constant > should be raised from E_NOTICE, probably to E_RECOVERABLE_ERROR, in PHP 7. > > I'm happy to expand this into a proper RFC, and work on patches for the > en

Re: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-08 Thread Benjamin Eberlei
The set() one is really nice with the typehints. On Tue, Oct 9, 2012 at 12:19 AM, Aaron Holmes wrote: > On 10/8/12 1:07 PM, Denis Portnov wrote: > >> 08.10.2012 15:52, Clint Priest пишет: >> >>> public $Hours { >>> get { return $this->Seconds / 3600; } >>> set { $this->Sec

Re: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-11 Thread Benjamin Eberlei
On Thu, Oct 11, 2012 at 2:35 AM, Clint Priest wrote: > Okay, I would like this to be the last time there are revisions to this > RFC. > > To sum up the last few days of conversations, I have these down as points > of contention: > > 1. Accessor functions should not be present on the object and c

Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-13 Thread Benjamin Eberlei
On Fri, Oct 12, 2012 at 7:23 AM, Clint Priest wrote: > Alright, here is the updated RFC as per discussions for the last few days: > > https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented > > If you could read it over, make sure I have all of your concerns correctly > addressed and we can

  1   2   3   4   >