pbiggar / phc

A compiler for PHP
132 stars 37 forks source link

add a PROPERTY to class will lead to display "Segmentation fault (core dumped)" ? #160

Open pbiggar opened 9 years ago

pbiggar commented 9 years ago
1.phc --extension=helloworld --generate-c helloworld.php > ext/helloworld.c
2.phpize --with-php-config=/usr/local/bin/php-config
3../configure --enable-helloworld
4.make
5.make install
6.change the php.ini,add "extension=helloworld.so" and save.
5.php -m
What is the expected output? What do you see instead?
it is ok and display "hellworld" module.
What version of the product are you using? On what operating system?
phc-0.3.0.1
php5.2.15
centos6.4

What steps will reproduce the problem?
<?php
helloworld.php
class hello
{
   public $name;
   public function hello()
   {
      return  $this->name;
   }

}
?>

1.phc --extension=helloworld --generate-c helloworld.php > ext/helloworld.c
2.phpize --with-php-config=/usr/local/bin/php-config
3../configure --enable-helloworld
4.make
5.make install
6.change the php.ini,add "extension=helloworld.so" and save.
5.php -m
What is the expected output? What do you see instead?
will display the "helloworld" module
but disaply "Segmentation fault (core dumped)"
What version of the product are you using? On what operating system?
phc-0.3.0.1
php5.2.15
centos6.4
Please provide any additional information below.

Original issue reported on code.google.com by ythluo on 2013-08-25 13:36:17

pbiggar commented 9 years ago
What steps will reproduce the problem?
<?php
helloworld.php
class hello
{
   public function hello()
   {
      return  "hello world";
   }

}
?>

1.phc --extension=helloworld --generate-c helloworld.php > ext/helloworld.c
2.phpize --with-php-config=/usr/local/bin/php-config
3../configure --enable-helloworld
4.make
5.make install
6.change the php.ini,add "extension=helloworld.so" and save.
5.php -m
What is the expected output? What do you see instead?
every thing is good.
it is ok and display "hellworld" module.
What version of the product are you using? On what operating system?
phc-0.3.0.1
php5.2.15
centos6.4

What steps will reproduce the problem?
<?php
helloworld.php
class hello
{
   public $name;
   public function hello()
   {
      return  $this->name;
   }

}
?>

1.phc --extension=helloworld --generate-c helloworld.php > ext/helloworld.c
2.phpize --with-php-config=/usr/local/bin/php-config
3../configure --enable-helloworld
4.make
5.make install
6.change the php.ini,add "extension=helloworld.so" and save.
5.php -m
What is the expected output? What do you see instead?

I wish to to display the "helloworld" module,but disaply "Segmentation fault (core
dumped)".

when I comment "extension=helloworld.so".
run 
<?php
  dl("helloworld.so");
  phpinfo();
?>
will display the "helloworld" module.

What is the problem "appending extension=helloworld.so to the php.ini will lead to
crash"

What version of the product are you using? On what operating system?
phc-0.3.0.1
php5.2.15
centos6.4
Please provide any additional information below.

Original issue reported on code.google.com by ythluo on 2013-08-25 13:52:13

pbiggar commented 8 years ago

phc can't currently compile objects. This will definitely need some contributions to get it to work.