[phc-general] How compile extensions with classes

Rolando Santamaria Maso rsantamaria at hab.uci.cu
Wed Feb 24 15:35:27 GMT 2010


Hi community, i am new with PHC. 

I try to create an extension from the following source:

class Hello
{
  /**
   *
   * @var string
   */
  private $prefix;



  public function  Hello()
  {
    $this->prefix = '_p__';
  }

  /**
   *
   * @param string $person_name
   * @return string
   */
  public function sayHello($person_name)
  {
    return $this->prefix.'Hello '.$person_name;
  }

}

But when I try to compile the extension
phc --extension=hello --generate-c hello.php > ext/hello.c

I get the following error message:
Could not generate code for unknown construct

Why is this happening?


---------------------
Thanks by default!!!


More information about the phc-general mailing list