On Sun, Jul 15, 2018, 22:45 Zeljko Mitic wrote:
> PHP is dynamic language and each typed typehinted parameter has to be
> checked every time. I am suggesting new php.ini value "typecheck.enable =
> 1" which can be turned off.
>
> Example:
> with default php config, a code like this would check ea
Not sure what timezone you are in; current votes are:
Add array_key_first() and array_key_last()?
- Yes (19)
- No (13)
Add array_value_first() and array_value_last()?
- Yes (16)
- No (17)
The first vote will pass with 59.375%. The second fails at ~48.48%.
--
PHP Internals - PHP Runtime
On 14 July 2018 at 14:09, Rowan Collins wrote:
> Hi all,
>
> The current RFC proposes the next simplest solution, which is to allow
> non-nullable types, and trust the user to initialise them before use.
>From the RFC:
> If a typed property does not have a default value, no implicit null defaul
PHP is dynamic language and each typed typehinted parameter has to be
checked every time. I am suggesting new php.ini value "typecheck.enable =
1" which can be turned off.
Example:
with default php config, a code like this would check each member of $users
array:
function demo(User ...$users) {}
On 14 July 2018 19:29:23 BST, Levi Morrison wrote:
>Whether it's a constructor, a factory method, or just a block of code
>near the `new` site: something has the responsibility for
>initialization.
Indeed, and my suggestion is to formalise that responsibility, so that mistakes
can be detected cl