-1

My text editor and php says unexpected ! after the || someone know this bug ? This is very weird

foreach($data as $pile->data) 
    if(!is_float($data) || ! is_int($data)) 
        die('Pile::sort() invalid $pile data');

I use VS code as text editor and PHP 7.2.24-0ubuntu0.18.04.2 (cli) (built: Jan 13 2020 18:39:59) ( NTS )

Arpit Jain
  • 1,217
  • 8
  • 27

3 Answers3

0

I already had this error, I had to update my editor and download the last version of Wamp. Not sure why but it worked for me. Maybe you should try it

Dpl0
  • 1
0

I updated my php and now this is working.

0

Sometimes, old versions are unable to distinguish multiple scenarios and spaces if added intentionally. first of all, use this modified code.

foreach($data as $pile->data) 
if((!is_float($data)) || (!is_int($data))) 
    die('Pile::sort() invalid $pile data');

Otherwise, please try to update to the latest version or do perform multiple checks. If the issue is still there, please do contact the official tool sport or read the official documentation.

Zia
  • 705
  • 9
  • 11