Re: [PHP-DEV] [RFC] UString

2015-07-01 Thread Aaron Piotrowski
> On Jul 1, 2015, at 2:25 PM, Anatol Belski wrote: > >> Expanding on this idea, a separate RFC could propose a magic > __cast($value) >> static method that would be called for code like below: >> >> $obj = (ClassName) $scalarOrObject; // Invokes >> ClassName::__cast($scalarOrObject); >> >> Thi

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-01 Thread Andrea Faulds
Hi Bob, > On 2 Jul 2015, at 01:26, Bob Weinand wrote: > >> Am 29.06.2015 um 19:14 schrieb Andrea Faulds : >> >> Hmm. Using Error might make some sense given it used to raise E_WARNING. I >> think DivisionByZeroError sounds like a good idea. > > Hey, > > I just committed that to master… Grea

Re: [PHP-DEV] Fix division by zero to throw exception (round 2)

2015-07-01 Thread Bob Weinand
> Am 29.06.2015 um 19:14 schrieb Andrea Faulds : > > Hi again, > >> On 29 Jun 2015, at 18:02, Bob Weinand wrote: >> >> Yes, it generally makes sense... >> Then I have other questions: >> >> - Why do we then still have a Warning? Either we have well-defined behavior, >> or we throw an exceptio

Re: [PHP-DEV] Re: Fixes for #69900 and #69963

2015-07-01 Thread Christoph Becker
Hi Anatol! Anatol Belski wrote: >> -Original Message- >> From: Christoph Becker [mailto:cmbecke...@gmx.de] >> Sent: Wednesday, July 1, 2015 12:55 AM >> To: Anatol Belski; 'PHP Internals' >> Cc: 'Pierre Joye'; 'Kalle Sommer Nielsen'; 'Dmitry Stogov'; 'Xinchen Hui'; >> 'Nikita >> Popov' >>

RE: [PHP-DEV] [RFC] UString

2015-07-01 Thread Anatol Belski
Hi, > -Original Message- > From: Aaron Piotrowski [mailto:aa...@icicle.io] > Sent: Wednesday, July 1, 2015 9:00 PM > To: Sara Golemon > Cc: pthre...@pthreads.org; internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] UString > > > > On Jul 1, 2015, at 1:06 PM, Sara Golemon wrote: > > >

Re: [PHP-DEV] [RFC] UString

2015-07-01 Thread Aaron Piotrowski
> On Jul 1, 2015, at 1:06 PM, Sara Golemon wrote: > > On Tue, Jun 30, 2015 at 10:36 PM, Joe Watkins wrote: >> Another possible issue is engine integration: >> >>$string = (UString) $someString; >>$string = (UString) "someString"; >> > That sounds as a cool idea to discuss as a complet

Re: [PHP-DEV] [RFC] UString

2015-07-01 Thread Sara Golemon
On Tue, Jun 30, 2015 at 10:36 PM, Joe Watkins wrote: > Another possible issue is engine integration: > > $string = (UString) $someString; > $string = (UString) "someString"; > That sounds as a cool idea to discuss as a completely separate, unrelated RFC, and not specific to UString. e.g.

RE: [PHP-DEV] Improved zend_string API

2015-07-01 Thread François Laupretre
> De : Bob Weinand [mailto:bobw...@hotmail.com] > > Interesting idea (from the concept). I even could get on board with this; I'm > just not that sure about the performance impact. (alignment of refcount to > base address etc.) zend_string *s; s = zend_string_alloc(256, 0)

Re: [PHP-DEV] Improved zend_string API

2015-07-01 Thread Bob Weinand
> Am 30.06.2015 um 20:16 schrieb François Laupretre : > >> De : morrison.l...@gmail.com [mailto:morrison.l...@gmail.com] De la part >> >> Just to time in with my $0.02: I feel that using macros as an >> abstraction in this case is bad practice. I believe that in *most* >> cases macros as an abst