Logica

Logica

A tiny programming language for custom logic flow in PHP applications

Try Logica



Output


8 is higher than 7
9 is higher than 7
10 is higher than 7
counter is higher than 10

Please report bugs and issues here.

Note: Spaces are there for a reason. This language is really simple and requires spaces to split calls.

Functions are defined within [square brackets].

Operations are defined with (brackets) and either one param or two params.

Variables are always global, and can be overwritten. Variables should be set like this:

variable name = value

Functions


if
a standard if block
param 1 must be a boolean (or something that returns a boolean like an operation)
must be ended with [fi]

jump
jumps to a line specified by param 1
note: lines start at 0

cat
will concatenate all parameters

print
will concatenate all parameters and print the result

exit
will exit

Operators with two params


==
===
!=
!==
>
>=
<
<=
%
+
-
||
&&

Operators with one param


!!
!

The code

Copy the whole source from Github.