Syntax

A SunSed script, starts and ends with the following.

<?
// SunSed code
?>

Folowing the question mark with an equal sign will automatically PRINT the SunSed expression.

<?= $user_name  ?>

File Extension

SunSed files only acceptable extension is .sunsed

SunSed Case Sensitivity

All SunSed keywords (IF, ELSE, WHILE, PRINT, RETURN, etc.), function names, and variables are case sensitive. The keywords need to be allways uppercase, and the functions need to be allways lowercase.

IF($user_has_agreed) {
    FOREACH($agreements AS $agreement) {
        PRINT $agreement['id']
    }
} ELSE {
    RETURN FALSE
}

While for variables, case sensitivity means that $name, $NAME, and $nAmE are all legal but treated as three different variables.

Copyright © SunSed LLC 2013-2021 All rights reserved.