@ 2015-10-03T13:18:51Z <?php
//function test3(){
// echo "Global test1";
//}
class Test{
function test1(){
test3();
}
private function test2(){
function test3(){
echo " Inner function\n ";
}
test3();
}
function test4(){
test3();
}
}
$test = new Test;
//$test->test1(); // Генерирует ошибку вида PHP Fatal error: Call to undefined function test3()
$test->test4();
test3();
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 Fatal error: Uncaught Error: Call to undefined function test3() in /in/XOl8k:16
Stack trace:
#0 /in/XOl8k(22): Test->test4()
#1 {main}
thrown in /in/XOl8k on line 16
Process exited with code 255 . Output for 5.4.2 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.7 - 5.6.28 Fatal error: Call to undefined function test3() in /in/XOl8k on line 16
Process exited with code 255 . preferences:dark mode live preview
171.09 ms | 402 KiB | 223 Q