Zephir is an actively used programming language created in 2013.

6Years Old 3,589Users 0Jobs
  • Zephir ranks in the top 50% of languages
  • the Zephir website
  • Zephir on github
  • Zephir first appeared in 2013
  • file extensions for Zephir include zep
  • the Zephir team is on twitter
  • I have 38 facts about Zephir. what would you like to know? email me and let me know how I can help.

Example code from Linguist:

/**
 * CBLOCK tests
 * asfas
 */

%{
// top statement before namespace, add to after headers
#define MAX_FACTOR 40
}%

namespace Test;

%{
// top statement before class, add to after headers
// test include .h
#include "kernel/require.h"
}%

%{

// c implement fibonacci
static long fibonacci(long n) {
        if (n < 2) return n;
        else return fibonacci(n - 2) + fibonacci(n - 1);
}

}%

class Cblock
{
    public function testCblock1()
    {
        int a = 0;

        %{
            a = MAX_FACTOR;
        }%

        return a;
    }

    public function testCblock2()
    {
            long a = 0;

            %{
                a = fibonacci(MAX_FACTOR);
            }%

            return a;
    }

}

Trending Repos

repo stars description

Last updated December 10th, 2019

Edit Zephir