PHP

Example 1


require "Runik"

function echo(s) _script.php
 [[
 echo($s);
 ]]
end

echo("Hello World!")

Example 2


require "Runik"

function crc16(s) _script.php
 [[
   $crc = 0xFFFF; 
   for ($x = 0; $x < strlen ($s); $x++) { 
     $crc = $crc ^ ord($s[$x]); 
     for ($y = 0; $y < 8; $y++) { 
       if (($crc & 0x0001) == 0x0001) { 
         $crc = (($crc >> 1) ^ 0xA001); 
       } else { $crc = $crc >> 1; } 
     } 
   } 
   $s = $crc; 
 ]]
 return s
end

Example 3 - Include


<?
function myecho($s){
 echo $s;
}
?>

require "Runik"

function echo(s) _script.php
 [[
 include('myecho.php');
 myecho($s);
 ]]
end

echo("Hello World!")

Custom PHP Functions

runik_write(v)

Writes a variable to the console without creating a new line

runik_writeln(v)

Writes a new line to the console