It is possible, but it is not healthy and not a good practice or something you would like to do on a daily bases. JavaScript and PHP are differently organized you will use Classes and Methods in PHP, where in JavaScript they are objects and functions.
Here is an example of what you are trying to do written in 5.2+ where there are no anonymous functions:
<?php
/*
var t = function() {};
t();
*/
function _t() {
echo '<br>T';
}
$t = '_t';
$t();
/*
myObj.DoStuff = function() {} // here I add a method at run-time
myObj.DoStuff();
myObj["DoStuff"]();
var j = myObj.DoStuff;
j();
*/
class myObj {
var $doStuff = '';
}
function _DoStuff() {
echo '<br>Do Stuff';
}
$myObj = new myObj();
$myObj->doStuff = '_DoStuff';
$j = $myObj->doStuff;
$j();
?>
In 5.3+ they introduced anonymouse functions so you can even do that
$t = function() {
echo 'T';
}
$t();
More about Anonymous functions here - http://php.net/manual/en/functions.anonymous.php
I would advise you to read more about Variable function names which is mostly helpful.
You can also dynamically inject functions inside a Class which is the second thing you are trying to do, but it is not a good idea in general. One guy did some work on that here - http://www.gen-x-design.com/archives/dynamically-add-functions-to-php-classes/