Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $nome = "Geicy Rodrigues";
- $a = 1;
- $b = 3;
- $c = 7;
- function exibeNome(){
- global $nome;
- echo $nome;
- }
- exibeNome();
- echo "<hr>";
- function exibeCidade(){
- global $cidade;
- $cidade = "Rio de Janeiro";
- }
- exibeCidade();
- echo $cidade;
- echo "<hr>";
- function soma() {
- echo $GLOBALS['a'] + $GLOBALS['b'] + $GLOBALS['c'];
- }
- soma();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement