orther
3/27/2011 - 4:47 PM

dynamic_cock_calls.php

<?php

class Test {

    function call ($method_name) {

        // echo $method_name;

        $this->{"call_".$method_name}();

    }

    private function call_cock () {

        echo "DONG FOR DAZE!!!\n";

    }

}


$t = new Test();

$t->call('cock');