What are common methods for adding a software license to a PHP module?

To add a software license to a PHP module, common methods include including a license header at the top of each PHP file, creating a LICENSE file in the root directory of the module, and specifying the license in the module's composer.json file.

<?php
/*
 * This is a sample PHP file with a license header
 * License: MIT
 */

// PHP code goes here