What is the purpose of the show_source() function in PHP?

The show_source() function in PHP is used to display the source code of a specified file in the browser. This can be helpful for debugging purposes or for educational purposes to understand how a particular script works. It allows developers to easily view the code without needing to open the file in a text editor.

<?php
$file = 'example.php';
show_source($file);
?>