What are the potential pitfalls of migrating from PHP 5.6 to PHP 7.0 in terms of deprecated functions and constants?

When migrating from PHP 5.6 to PHP 7.0, one potential pitfall is the use of deprecated functions and constants that are no longer supported in the newer version. To solve this issue, it is important to update the codebase by replacing deprecated functions and constants with their updated equivalents to ensure compatibility and avoid any runtime errors.

// Deprecated function in PHP 5.6
mysql_connect($server, $username, $password);

// Updated function in PHP 7.0
$mysqli = new mysqli($server, $username, $password);