# Segmentation Fault when using interface

- Thread: https://externals.io/message/11021
- Original archive: https://news-web.php.net/php.internals/11021
- Started by Jason Garber on 2004-07-09T07:50:34+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #11021 — Jason Garber — 2004-07-09T07:50:34+00:00

URL: https://externals.io/message/11021#11021

Hello,

I discovered this problem tonight while working on a new PHP 5 class that 
uses an interface.  The code example came from 
http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5


<?php
    interface Throwable {
       public function getMessage();
    }

    class MyException implements Throwable {
       public function getMessage() {
           echo "Hello\n";
       }
    }

    $x = new MyException;
    $x->getMessage();
?>

------------------

On this server, I get a Segmentation Fault:

[ionzoft@lithium dev]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 24 2004 17:35:13)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
     with Zend Extension Manager v1.0.2, Copyright (c) 2003-2004, by Zend 
Technologies
     with Zend Optimizer v2.5.2, Copyright (c) 1998-2004, by Zend Technologies
     with Zend Debugger v3.5.0, Copyright (c) 1999-2004, by Zend Technologies

[ionzoft@lithium dev]$ php -f Interface.php
Segmentation fault

------------------

On this server, It works fine:

[izsp@boron Jason]$ php -v
PHP 5.0.0RC3 (cli) (built: Jun 14 2004 14:04:10)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies

[izsp@boron Jason]$ php -f Interface.php
Hello

------------------

Could it be a problem with the Debugger?

Thanks,
Jason Garber

---

## #11025 — Zeev Suraski — 2004-07-09T11:14:08+00:00

URL: https://externals.io/message/11021#11025 · In reply to: #11021

We'll look into it and let you know whether it's in PHP or in one of the 
extensions modules.

Thanks for the report!

Zeev

At 10:50 09/07/2004, Jason Garber wrote:
>Hello,
>
>I discovered this problem tonight while working on a new PHP 5 class that 
>uses an interface.  The code example came from 
>http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5
>
>
><?php
>    interface Throwable {
>       public function getMessage();
>    }
>
>    class MyException implements Throwable {
>       public function getMessage() {
>           echo "Hello\n";
>       }
>    }
>
>    $x = new MyException;
>    $x->getMessage();
>?>
>
>------------------
>
>On this server, I get a Segmentation Fault:
>
>[ionzoft@lithium dev]$ php -v
>PHP 5.0.0RC3 (cli) (built: Jun 24 2004 17:35:13)
>Copyright (c) 1997-2004 The PHP Group
>Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
>     with Zend Extension Manager v1.0.2, Copyright (c) 2003-2004, by Zend 
> Technologies
>     with Zend Optimizer v2.5.2, Copyright (c) 1998-2004, by Zend Technologies
>     with Zend Debugger v3.5.0, Copyright (c) 1999-2004, by Zend Technologies
>
>[ionzoft@lithium dev]$ php -f Interface.php
>Segmentation fault
>
>------------------
>
>On this server, It works fine:
>
>[izsp@boron Jason]$ php -v
>PHP 5.0.0RC3 (cli) (built: Jun 14 2004 14:04:10)
>Copyright (c) 1997-2004 The PHP Group
>Zend Engine v2.0.0RC3, Copyright (c) 1998-2004 Zend Technologies
>
>[izsp@boron Jason]$ php -f Interface.php
>Hello
>
>------------------
>
>Could it be a problem with the Debugger?
>
>Thanks,
>Jason Garber

---

## #11026 — Derick Rethans — 2004-07-09T11:30:07+00:00

URL: https://externals.io/message/11021#11026 · In reply to: #11021

> Hello,
>
> I discovered this problem tonight while working on a new PHP 5 class that
> uses an interface.  The code example came from
> http://www.zend.com/php5/articles/engine2-php5-changes.php#Heading5

Please also file this bug inthe bug system (bugs.php.net).

regards,
Derick

---

## #11043 — Jason Garber — 2004-07-09T21:16:39+00:00

URL: https://externals.io/message/11021#11043 · In reply to: #11021

Bug #29081      Segmentation Fault when using Interface
http://bugs.php.net/bug.php?id=29081

-Jason

At 7/9/2004 01:30 PM +0200, you wrote:
>
>
> > […]
>
>Please also file this bug inthe bug system (bugs.php.net).
>
>regards,
>Derick
