From: pierre dot lasante at sympatico dot ca Operating system: Windows XP sp2 PHP version: 5.1.2 PHP Bug Type: Reproducible crash Bug description: abstract keyword produces Fatal Error in an interface.
Description: ------------ This is the error I get when I run my script: Fatal error: Access type for interface method Openable::open() must be omitted in C:\Program Files\Apache Group\Apache2\htdocs\zend\interface.Openable.php on line 3 These are my scripts: interface.Openable.php <?php interface Openable { public abstract function open(); public abstract function close(); } ?> class.Jar.php <?php require_once('interface.Openable.php'); class Jar implements Openable { private $contents; public function __construct($contents) { $this->contents = $contents; } function open() { print "The jar is now open<br />"; } function close() { print "The jar is now closed<br />"; } } ?> testOpenable.php <?php require_once('class.Jar.php'); function openSomething(Openable $obj) { $obj->open(); } $objJar = new Jar('Jelly'); openSomething($objJar); ?> If I remove the abstract keyword in interface.Openable.php I don't get the error. Is it because of PHP 5.1.2 and that I need to upgrade? Regards. -- Edit bug report at http://bugs.php.net/?id=36122&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36122&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36122&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36122&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36122&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36122&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36122&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36122&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36122&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36122&r=support Expected behavior: http://bugs.php.net/fix.php?id=36122&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36122&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36122&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36122&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36122&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36122&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36122&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36122&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36122&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36122&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36122&r=mysqlcfg