The code of PHP5.5 reported an error on php7.0.

Php
Mar.01,2021

doesn't look like a problem with the PHP version. Excuse me, are you using PhpStorm?

if so, open the search box in the upper left corner of the menu Files-> Settings, to search for "language level"
should be able to find "PHP language level" this item, on behalf of the editor to check the syntax of the assumed version of PHP, if set too low, some high versions of PHP syntax will report an error, just adjust it up.

Menu