#29828 [Csd]: Interfaces no longer work
| From: | helly@php.net | Date: | Thu, 26 Aug 2004 22:48:12 +0000 |
| Subject: | #29828 [Csd]: Interfaces no longer work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65312@lists.php.net to get a copy of this message | ||
ID: 29828
Updated by: helly@php.net
Reported By: jellybob at gmail dot com
Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5.*
+PHP Version: 5.0.1
Assigned To: helly
New Comment:
Well look at Zend/tests/bug29828.phpt, you might find something that
reminds you of something you wrote :-)
Anyway bug is solved now.
Previous Comments:
------------------------------------------------------------------------
[2004-08-27 00:02:52] jellybob@php.net
Sorry, I tried to mention it being due to Zend Optimiser here, but the
add comment function wasn't working for me.
helly: Should have included some better example code.
------------------------------------------------------------------------
[2004-08-26 23:57:57] helly@php.net
Apart from the SEGV based on Zend Optimizer the Bug report shows
another problem. The code is not working at all in 5.* and that is not
becasue of the Optimizer.
The problem is that the interface has a function with the name of the
interface itself. This is an old style constructor which is not allowed
for interfaces.
------------------------------------------------------------------------
[2004-08-25 09:55:31] derick@php.net
You mention on your website that it was Zend Optimizer, so bogussing
this report. Please add those comments yourself next time as not all
PHP developers are monitoring your website.
------------------------------------------------------------------------
[2004-08-25 08:29:58] derick@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2004-08-25 01:52:04] jellybob at gmail dot com
Description:
------------
It appears that attempting to implement any interface when creating a
class will cause PHP to segfault.
Reproduce code:
---------------
<?php
interface Blah {
public function blah();
}
class BlahMore implements Blah {
public function blah() {
echo "Hello, world!";
}
}
$obj = new BlahMore();
$obj->blah();
?>
Expected result:
----------------
Hello, world!
Actual result:
--------------
jon@bertha:~/php-5.0.1> php ~/test.php
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29828&edit=1