[ create a new paste ] login | about

Link: http://codepad.org/NAuj6tmK    [ raw code | output | fork ]

gion_13 - PHP, pasted on Mar 29:
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
    // call foo
    foo();

    //define foo
    function foo(){
         echo "foo was called before being defined";
    }

   //calling an undeclared function
   //will trigger an error
   bar();
?>


Output:
1
2
foo was called before being defined
Fatal error: Call to undefined function bar() on line 12


Create a new paste based on this one


Comments: