Jump to content

Nove

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Nove's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Here's a mockup I've tried to be able to set functions of a class when the object is constructed.  I'm not really sure how to go about this, but from what I've made you should get the idea that I want to set f and g to functions.  How can I do this? [code]function clarence() { echo "clarence!"; } function marla() { echo "marla!"; } class functioner { function __construct(&$v, &$b) { $this->f = $v(); $this->g = $b(); } } $c = new functioner(clarence, marla); $c->t = "5"; echo $c->t; $c->f(); $c->g(); [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.