Arguments by Reference
Posted: Mon Nov 01, 2010 10:17 pm
Hi guys,
Stumbled upon something earlier and wanted to ask. Can you pass arguments from a return function to another function in OOP? (PHP)
For example:
Is there any way to make this work?
Stumbled upon something earlier and wanted to ask. Can you pass arguments from a return function to another function in OOP? (PHP)
For example:
Code: Select all
class foo {
function bar() {
return 'bar';
}
function printBar($sometypeofargumentfrombar()) {
print($sometypeofargument);
}
}
$foo = new foo();
$foo->bar()->printBar();Is there any way to make this work?