Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Karl Pflästerer
Bishop Bettini writes: > On Mon, Jun 27, 2016 at 11:31 AM, Andreas Heigl wrote: > >> Am 27.06.16 um 15:28 schrieb Karl Pflästerer: >> > Andreas Heigl writes: >> > >> >> Am 27.06.16 um 15:01 schrieb Karl Pflästerer: >> >>> interface I1 { const C1 = '';} >> >>> class C3 implements I1 { const C1 =

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Bishop Bettini
On Mon, Jun 27, 2016 at 11:44 AM, Rowan Collins wrote: > > PHP Fatal error: Cannot inherit previously-inherited or override >> constant C1 from interface I1 in >> > > Can I just say this is a positively hideous error message. I can't > actually figure out how to parse its grammar: is it (inherit

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Rowan Collins
On 27/06/2016 16:31, Andreas Heigl wrote: So it crashes with a fatal error when Implementing the interface. It'S interesting though that the script allows me to instantiate the class nonetheless. It sounds to me like the ability of the interactive shell to catch fatal errors and continue allow

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Andreas Heigl
Am 27.06.16 um 17:41 schrieb Bishop Bettini: > On Mon, Jun 27, 2016 at 11:31 AM, Andreas Heigl wrote: > >> Am 27.06.16 um 15:28 schrieb Karl Pflästerer: >>> Andreas Heigl writes: >>> Am 27.06.16 um 15:01 schrieb Karl Pflästerer: > interface I1 { const C1 = '';} > class C3 implements

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Bishop Bettini
On Mon, Jun 27, 2016 at 11:31 AM, Andreas Heigl wrote: > Am 27.06.16 um 15:28 schrieb Karl Pflästerer: > > Andreas Heigl writes: > > > >> Am 27.06.16 um 15:01 schrieb Karl Pflästerer: > >>> interface I1 { const C1 = '';} > >>> class C3 implements I1 { const C1 = 'c2';} > >>> $c3 = new C3; > >>>

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Andreas Heigl
Am 27.06.16 um 15:28 schrieb Karl Pflästerer: > Andreas Heigl writes: > >> Am 27.06.16 um 15:01 schrieb Karl Pflästerer: >>> interface I1 { const C1 = '';} >>> class C3 implements I1 { const C1 = 'c2';} >>> $c3 = new C3; >>> var_dump($c3::C1); >> >> According to https://3v4l.org/jIcs6 it looks li

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Christoph Becker
On 27.06.2016 at 15:28, (Karl Pflästerer ) wrote: > Andreas Heigl writes: > >> Am 27.06.16 um 15:01 schrieb Karl Pflästerer: >>> interface I1 { const C1 = '';} >>> class C3 implements I1 { const C1 = 'c2';} >>> $c3 = new C3; >>> var_dump($c3::C1); >> >> According to https://3v4l.org/jIcs6 it loo

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Karl Pflästerer
Am 27.06.16 um 17:04 schrieb Christoph Becker: On 27.06.2016 at 15:28, (Karl Pflästerer ) wrote: Andreas Heigl writes: Am 27.06.16 um 15:01 schrieb Karl Pflästerer: interface I1 { const C1 = '';} class C3 implements I1 { const C1 = 'c2';} $c3 = new C3; var_dump($c3::C1); According to http

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Karl Pflästerer
Andreas Heigl writes: > Am 27.06.16 um 15:01 schrieb Karl Pflästerer: >> interface I1 { const C1 = '';} >> class C3 implements I1 { const C1 = 'c2';} >> $c3 = new C3; >> var_dump($c3::C1); > > According to https://3v4l.org/jIcs6 it looks like that's intended > behaviour ;) But why does it work i

Re: [PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Andreas Heigl
Am 27.06.16 um 15:01 schrieb Karl Pflästerer: > interface I1 { const C1 = '';} > class C3 implements I1 { const C1 = 'c2';} > $c3 = new C3; > var_dump($c3::C1); According to https://3v4l.org/jIcs6 it looks like that's intended behaviour ;) Cheers Andreas --

[PHP-DEV] Possible Bug with Interface, Constants and Inheritance

2016-06-27 Thread Karl Pflästerer
Hi, I'm not sure if it's a bug or not. Consider these simple script: php -v PHP 7.0.7 (cli) (built: May 27 2016 15:22:32) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies ~> php -a -ddispplay_errors=On Interactive shell php > interface