fork download
  1. <?php
  2. $dsn = 'algo'; //Não constava
  3. $DSN = $dsn;
  4. echo $DSN;
  5. function insert_in_DB($query) {
  6. echo $DSN;
  7. }
  8.  
  9. insert_in_DB('algo aqui'); //A saída será: 'algo'
Success #stdin #stdout #stderr 0.02s 24648KB
stdin
Standard input is empty
stdout
algo
stderr
PHP Notice:  Undefined variable: DSN in /home/Dz0CQg/prog.php on line 6