On 4 September 2017 01:27:49 BST, Jefferson Gonzalez <jgm...@gmail.com> wrote:
>I upgraded my PHP version on a server from 7.0 to latest 7.1.9 and got 
>this strange behaviour, did something changed on the core language or
>is 
>this a bug?
>
>PHP sample code:
>------------------------------------------
><?php
>
>function test()
>{
>   static $staticValue = test2();
>
>   return $staticValue;
>}
>
>function test2()
>{
>   return array();
>}
>
>print_r(test());
>

According to 3v4l.org this has never been valid: https://3v4l.org/vRaNK The 
error message changed between 5.x and 7.x, but if you're already on 7.0 you 
shouldn't have seen any change.

Are you sure this test case correctly represents the code you're having 
problems with?

Regards,

-- 
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to