Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to debug with zephir?

I write a class with zephir,run zephir compile,return same errors,but can't fix bug for errors.

zephir compile --backend=ZendEngine3
Zephir\Exception: Cannot parse file: /Users/apple/data/extension/phalcon/phalcon-php7/converted/Medoo/medoo/Medoo/medoo.zep
at Library/CompilerFile.php(570)
#0 Library/Compiler.php(331): Zephir\CompilerFile->preCompile(Object(Zephir\Compiler))
#1 Library/Compiler.php(370): Zephir\Compiler->preCompile('Medoo/medoo.zep')
#2 Library/Compiler.php(965): Zephir\Compiler->recursivePreCompile('Medoo/')
#3 Library/Compiler.php(1194): Zephir\Compiler->generate(Object(Zephir\Commands\CommandCompile))
#4 Library/Commands/CommandAbstract.php(108): Zephir\Compiler->compile(Object(Zephir\Commands\CommandCompile))
#5 Library/Bootstrap.php(200): Zephir\Commands\CommandAbstract->execute(Object(Zephir\Config), Object(Zephir\Logger))
#6 compiler.php(21): Zephir\Bootstrap::boot()
#7 {main}

@kcloze Could you please provide script to reproduce?



358

How to fix which line code made the error?



358
edited Jul '16

code in github

I use php-to-zephir generate this code. @Serghei Iakovlev

Too much code. Try to remove methods one by one and compile



358
edited Jul '16
Zephir\CompilerException: Constructors cannot return values in /Users/apple/data/extension/phalcon/phalcon-php7/converted/Medoo/medoo/medoo/medoo.zep on line 39

                        return false;
        ----------------------------^

thanks,but why construct can't return false ?

Because __contructor can't return



5.8k
Accepted
answer

@kcloze Was the issue solved?



358

thanks´╝îit's ok.