PHP code example of datahihi1 / tiny-env-validator

1. Go to this page and download the library: Download datahihi1/tiny-env-validator 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/ */

    

datahihi1 / tiny-env-validator example snippets




// procedural helper
validate_env([
  'APP_ENV'   => ''
]);

// or using a Validator class (if available)
// $validator = new Datahihi1\TinyEnv\Validator([...rules...]);
// $validator->validate();

validate_env([
  'VERSION' => 'EBUG' => 'bool'
]);