Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | function env($name, $default = null) |
||
46 | { |
||
47 | $name = strtoupper($name); |
||
48 | $value = getenv($name); |
||
49 | |||
50 | if (false === $value) { |
||
51 | return $default; |
||
52 | } |
||
53 | |||
54 | if ('(false)' === $value) { |
||
55 | return false; |
||
56 | } |
||
57 | |||
58 | if ('(true)' === $value) { |
||
59 | return true; |
||
60 | } |
||
61 | |||
62 | return $value; |
||
63 | } |
||
64 | } |
||
65 |