Created
September 15, 2017 05:52
-
-
Save johnroyer/52990142c1663fe153b85875c540a9cd to your computer and use it in GitHub Desktop.
env-config-comparison
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$valid = [ | |
'production' => '10.0.1.0/24', | |
'stage' => '10.0.1.0/24', // 和 production 重複 | |
'dev' => '192.168.1.0/24', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$valid = []; | |
switch (ENV) { | |
case 'production': | |
case 'stage': | |
$valid[] = '10.0.1.0/24'; | |
break; | |
case 'dev': | |
$valid[] = '192.168.1.0/24'; | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment