Re: [PHP-DEV] Proposed changes to PHP language
On 06.03.13 13:48, Max Romanovsky wrote: >4. Add handling of DateTime objects to SoapServer and SoapClient. It >will help in using this build-in datatype without typemap. This is (at least partially) covered by the patch in https://bugs.php.net/44383. Have you tried that one to see if its good? - Martin -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Proposed changes to PHP language
On 6 March 2013 15:50, Alexandre "TAZ" dos Santos Andrade < alexandre...@gmail.com> wrote: > This item > 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. > > StdClass Already do that > > > 3. Parse body of PUT request in the same manner as it's done for POST +1 -- WWW: plphp.dk / plind.dk CV: careers.stackoverflow.com/peterlind LinkedIn: plind Twitter: kafe15
Re: [PHP-DEV] Proposed changes to PHP language
On 3/6/13 7:48 AM, Max Romanovsky wrote: 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. Type-hinting for non-stdClass objects would be handy. Base class is like mutable Object.prototype in JS. I'm against it. 3. Parse body of PUT request in the same manner as it's done for POST There are arguments for/against here: https://bugs.php.net/bug.php?id=55815 compatibility. Otherwise $_REQUEST handling should be aware of new array with PUT data. For BC, PUT data should not be injected into existing vars. Steve Clay -- http://www.mrclay.org/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Proposed changes to PHP language
> > > 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. >> > Introduce a type-hint “object” would be better I think. It would replace > is_object call. I wonder how much BC breakage there would be introducing an Object class / type-hint though. Right now it's perfectly acceptable to define a class called Object (or object). An ugly solution could be to re-use stdClass as the base of all classes.
Re: [PHP-DEV] Proposed changes to PHP language
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 job. 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. Introduce a type-hint “object” would be better I think. It would replace is_object call. 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. var_dump(file_get_contents('php://input')); Why is it complicated? And place PUT request body in $_POST sounds a bad idea :-). 4. Add handling of DateTime objects to SoapServer and SoapClient. It will help in using this build-in datatype without typemap. I tried to google for these proposals, but didn't find any previous discussions. Cheers :-). -- Ivan Enderlin Developer of Hoa http://hoa-project.net/ PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis) http://disc.univ-fcomte.fr/ and http://www.inria.fr/ Member of HTML and WebApps Working Group of W3C http://w3.org/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Proposed changes to PHP language
On 6 March 2013 12:48, Max Romanovsky 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.
[PHP-DEV] Proposed changes to PHP language
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; } 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. 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. 4. Add handling of DateTime objects to SoapServer and SoapClient. It will help in using this build-in datatype without typemap. I tried to google for these proposals, but didn't find any previous discussions. -- Max Romanovsky