<?php
class x
{
function y()
{
function z(){ echo 'Hello world'; }
}
}
$x = new x;
var_dump(function_exists('z'));
$x-y();
var_dump(function_exists('z'), z());
bool(false)
Fatal error: Uncaught Error: Call to undefined function y() in /in/kPAjP:13
Stack trace:
#0 {main}
thrown in /in/kPAjP on line 13
Process exited with code 255.