PHP code example of tegic / constants

1. Go to this page and download the library: Download tegic/constants library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tegic / constants example snippets


use tegic\Constants;

class Enum extends Constants
{
     /**
     * @Message("test")
     */
     CONST TEST = 1;
    /**
     * @Message("test1:%s,%s")
     */
     CONST TEST1 = 2;
}



Enum::getMessage(Enum::TEST);
Enum::getMessage(Enum::TEST1,['1','2']);