-
-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Call Static Methods of External Classes [$10] #916
Comments
Alternatively: |
I think warning was caused by Can you show full compiler exception? |
ping @Stormwing |
Howdy, The compiler will produce an error like this:
|
ping @Stormwing Maybe this one will help you. namespace Utils;
class SomeClass {
public function getClassName()
{
var className = "NotExists";
return {className}::method();
}
} #!/usr/bin/env php
<?php
class NotExists
{
public static function method()
{
return "Hello from big Hangout";
}
}
$a = new \Utils\SomeClass();
var_dump($a->getClassName()); |
I am having the same problem. Neither of the workarounds work for me.
|
@fabiante To achieve better performance consider use create_instance_params and avoid call_user_func_array as long as you can. |
We figured out, that this works, as long as double backslashes are used:
@sergeyklay Thanks |
Hello,
Zephir allows us to create objects that are not currently defined in the project like so:
However we cannot call static methods as might be expected:
I'm currently using this as a workaround:
Thank you, Zephir people!
Using Zephir at commit 416c989 (Wed Apr 22).
The text was updated successfully, but these errors were encountered: