1.2.1404. Uses Environment

This rule spots usage of $_ENV, getenv() and putenv() functions: they fetch data from the environment variables.

<?php

// Take some configuration from the environment
$secret_key = getenv('secret_key');

?>

1.2.1404.1. Specs

Short name

Php/UsesEnv

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

environment

Available in

Entreprise Edition, Community Edition, Exakat Cloud