Guest User

Untitled

a guest
Oct 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. <?php
  2. $x = 5; // global scope
  3.  
  4. function myTest() {
  5. // using x inside this function will generate an error
  6. echo "<p>Variable x inside function is: $x</p>";
  7. }
  8. myTest();
  9.  
  10. echo "<p>Variable x outside function is: $x</p>";
  11. ?>
Add Comment
Please, Sign In to add comment