src/Compiler/Compiler.php
private function validateCallable(string $str)
    {
        ob_start();
        try{
            $_ = @eval('return '.$str.';');
            if (!is_callable($_)){
                throw new ValidateCallableException($str);
            }
        }
        catch(\Throwable $e){
            ob_end_clean();
            throw new CompileErrorException($e->getMessage(), $this->state);
        }
        ob_end_clean();
    }
private function validateCallable(string $str)
    {
        ob_start();
        try{
            $_ = @eval('return '.$str.';');
            if (!is_callable($_)){
                throw new ValidateCallableException($str);
            }
        }
        catch(\Throwable $e){
            ob_end_clean();
            throw new CompileErrorException($e->getMessage(), $this->state);
        }
        ob_end_clean();
    }
private function validateCallable ( string $ str ) { ob_start ( ) ; try { $ _ = @ eval ( 'return ' . $ str . ';' ) ; if ( ! is_callable ( $ _ ) ) { throw new ValidateCallableException ( $ str ) ; } } catch ( \ Throwable $ e ) { ob_end_clean ( ) ; throw new CompileErrorException ( $ e -> getMessage ( ) , $ this -> state ) ; } ob_end_clean ( ) ; }
Validate if expression is callable

@param string $str

@throws CompileErrorException
Validate if expression is callable