jphp-group / jphp

JPHP - an implementation of PHP on Java VM

Home Page:http://jphp.develnext.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot alias namespace with `use`

danog opened this issue · comments

Code:

// src/n.php 

namespace a;

use b;

include 'src/included.php';

new b\test();

// src/included.php

namespace b;

class test
{}

Result:

[daniil@daniil-arch jav]$ php src/n.php 
[daniil@daniil-arch jav]$ jppm start
-> linux
-> app:run 
-> install 

Fatal error: Uncaught Error: Class 'a\b\test' not found in res://n.php on line 9, position 1
Stack Trace:
#0 <internal>() called at [res://n.php:1]
#1 {main}
  thrown in res://n.php on line 9