# segfault with ze2 #3

- Thread: https://externals.io/message/194
- Original archive: https://news-web.php.net/php.internals/194
- Started by Sterling Hughes on 2003-03-23T16:47:07+00:00
- Messages: 3
- 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

---

## #194 — Sterling Hughes — 2003-03-23T16:47:07+00:00

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

<?php                                                                                                                   namespace Foo {
        class Bar {
                function boom() {
                        echo "BOOM!\n";
        }
}

import Bar;

$b = new Bar;
$b->boom();
?>

The import parse error will cause a segfault.

-Sterling

-- 
"Programming today is a race between software engineers stirring to  
 build bigger and better idiot-proof programs, and the universe trying  
 to produce bigger and better idiots. So far, the universe is winning." 
    - Unknown

---

## #195 — Sterling Hughes — 2003-03-23T16:53:46+00:00

URL: https://externals.io/message/194#195 · In reply to: #194

> <?php                                                                                                                   namespace Foo {
>         class Bar {
>                 function boom() {
>                         echo "BOOM!\n";
>         }
> }
> 
> import Bar;
> 
> $b = new Bar;
> $b->boom();
> ?>
> 
> The import parse error will cause a segfault.
> 

Just a note that most import statements cause a parser error + segfault:

import Bar from Foo
import * from Foo

etc.


> -Sterling
> 
> -- 
> "Programming today is a race between software engineers stirring to  
>  build bigger and better idiot-proof programs, and the universe trying  
>  to produce bigger and better idiots. So far, the universe is winning." 
>     - Unknown
-- 
"A business that makes nothing but money is a poor kind of business." 
    - Henry Ford

---

## #199 — Stanislav Malyshev — 2003-03-23T18:13:57+00:00

URL: https://externals.io/message/194#199 · In reply to: #194

This one should be fixed now.

SH>> <?php                                                                                                                   namespace Foo {
SH>>         class Bar {
SH>>                 function boom() {
SH>>                         echo "BOOM!\n";
SH>>         }
SH>> }
SH>> 
SH>> import Bar;
SH>> 
SH>> $b = new Bar;
SH>> $b->boom();
SH>> ?>
SH>> 
SH>> The import parse error will cause a segfault.
SH>> 
SH>> -Sterling
SH>> 
SH>> 

-- 
Stanislav Malyshev, Zend Products Engineer   
stas@zend.com  http://www.zend.com/ +972-3-6139665 ext.109
