Reimplement import() builtin function as a global-scope statement. This fixes #58.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'math';
|
||||
|
||||
class Program {
|
||||
|
||||
private string num2alpha(int $n) {
|
||||
@@ -19,7 +21,6 @@ class Program {
|
||||
}
|
||||
|
||||
public void main() {
|
||||
import('math');
|
||||
var_dump($this->alpha2num("Salut"), $this->num2alpha(1723), $this->num2alpha(9854), $this->alpha2num("Base64"));
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import 'dummy';
|
||||
|
||||
final class Program {
|
||||
public void main() {
|
||||
var_dump(function_exists('dummy_function'));
|
||||
var_dump(import('dummy'));
|
||||
var_dump(function_exists('dummy_function'));
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1 @@
|
||||
bool(FALSE)
|
||||
bool(TRUE)
|
||||
bool(TRUE)
|
||||
|
Reference in New Issue
Block a user