What are the potential pitfalls of using PHP5 syntax in older PHP code?

Using PHP5 syntax in older PHP code can lead to compatibility issues if the code is being run on a server with an older version of PHP installed. To solve this issue, it is recommended to update the code to use PHP7 syntax, which is more modern and widely supported.

// Before
function myFunction() {
    $array = array(1, 2, 3);
}

// After
function myFunction() {
    $array = [1, 2, 3];
}