Re: Proposed changes to PHP language

From: Date: Wed, 06 Mar 2013 13:08:31 +0000
Subject: Re: Proposed changes to PHP language
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 6 March 2013 12:48, Max Romanovsky <[email protected]> wrote:

> Dear PHP Community,
>
> 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; }
>

catch (Exception $e) { throw $e; }

This does what you want? (A quick test my end appears to keep the stack
trace in-tact at least)


>    2. Introduce base class for all PHP classes. E.g. Object. It would help
>    in type hinting and allow to add new common methods without any magic.
>

I like this idea.


>    3. Parse body of PUT request in the same manner as it's done for POST
>    request. I guess it should be stored in $_POST array to maintain
> backward
>    compatibility. Otherwise $_REQUEST handling should be aware of new array
>    with PUT data.
>

I don't really like the idea of putting non-POST data in $_POST

It would still be nice to have a better way of handing PUT though.


Thread (8 messages)

« previous php.internals (#66488) next »