How does the use of Server Side Includes (SSI) compare to using PHP include() function for creating menus on web pages?

Server Side Includes (SSI) are directives that are placed in HTML files and processed by the web server to include external files into the HTML document. On the other hand, PHP include() function is used to include and evaluate the specified file during the execution of the script. While both methods can be used to create menus on web pages, using PHP include() function provides more flexibility and control as PHP is a more powerful server-side scripting language compared to SSI.

<?php
include 'menu.php';
?>