What are common syntax errors to watch out for when transitioning from PHP5 to PHP7?

One common syntax error to watch out for when transitioning from PHP5 to PHP7 is the use of the "mysql_" functions, which have been deprecated in PHP7. To solve this issue, you should update your code to use the "mysqli_" or "PDO" functions for database interactions.

// Before (PHP5)
$conn = mysql_connect('localhost', 'username', 'password');
mysql_select_db('database', $conn);

// After (PHP7)
$conn = mysqli_connect('localhost', 'username', 'password');
mysqli_select_db($conn, 'database');