<?php include(__DIR__.'test_secrets.php'); $test_arr = [ "FOO","BAR" ]; $_ENV['MM_K']=$secrets->key; $_ENV['MM_S']=$secrets->secret; // the stand out difference $_ENV['TEST']=$test_arr; putenv("MM_K=".$secrets->key); putenv("MM_S=".$secrets->secret); define("MM_K",$secrets->key); define("MM_S",$secrets->secret); include(__DIR__.'/test_inc.php'); test_global(); echo "************\n"; test_env(); echo "************\n"; test_cons(); echo "************\n"; function test_global(){ echo "Auth str inside global func: ".$_ENV['MM_K'].":".$_ENV['MM_S']."\n"; } function test_env(){ echo "Auth str inside env func: ".getenv('MM_K').":".getenv('MM_S')."\n"; } function test_cons(){ echo "Auth str inside cons func: ".MM_K.":".MM_S."\n"; } ?>