Is supported "Include" statement on Zephir ?

I'm trying the Zephir compiler out. Is supported "include" statement ?

my Zephir code is..

namespace Dumy;
final class Mage{
    public static function renderHtml(){
        include("/var/www/magento/include/b.php");
    }
}

but, it doesn't work.

$ zephir compile

Warning: Function "include" does not exist at compile time in /var/www/magento/temp/dumy/dumy/mage.zep on 5 [nonexistant-function]

thanks.



86.2k

No, "include" is not supported, "require" will be supported but it is still not implemented

edited 17d ago

Seems require is still not implemented :s, needed for an RPC thing im doing.. there is a work-around.

Use eval()

    // load and eval class (include, require not supported "yet")
    var src = file_get_contents("/path/to/file.php");
    eval("?>" . src);

Whoops, sorry maybe wrong forum, came from a google search zephir include php