HA: Re: [PHP-DEV] Proposal fo "Code-free constructors declaration"

2019-01-24 Thread Andrey O Gromov
I'm added an illustration. Maybe it more clear for understanding. https://wiki.php.net/_detail/rfc/joined.png?id=rfc%3Acode_free_constructor >> Proposed syntax >> class A($prop) extends B("BlaBla", $prop) { >> } > This looks like unobvious magic. PHP approach has traditionally been to > avoid uno

HA: Re: [PHP-DEV] Proposal fo "Code-free constructors declaration"

2019-01-23 Thread Andrey O Gromov
>> Proposed syntax >> class A($prop) extends B("BlaBla", $prop) { >> } >Would this work with anonymous classes? If so, how would the syntax look like? Currently this syntax can't be used with anonymous classes because those classes instantiated at once they declared and same syntax is used for