I need to know something about OOP in PHP.
Can I put functions in class methods or no ? Like this:
<?php
class test {
function test1() {
// do something
function test1_1() {
// something else
}
}
}
?>
And use it in this way: $test->test1->test1_1();
No you cannot. That would just create a new function in the global namespace and will give you errors of trying to redeclare the function when called multiple times.