1<?php
2class Test {
3    function method() {
4        function dynamic() {
5            echo "dynamic\n";
6        }
7    }
8}
9
10function func() {
11    function dynamic2() {
12        echo "dynamic2\n";
13    }
14}
15
16$test = new Test;
17$test->method();
18func();
19