var s = "test string"+"test concat";
var s1 = "test
multi
line";
vars s2 = 'test';
s.print();
print( s );
//another type
int a = 10;
char t = "text";
long a = 10;
typedef struct {
int a;
char b;
} test;
test tst;
print( tst.a );
print( sizeof( test ) );
String.fn.json = ( str ) {
//do json function on string ...
}
var j = '{"test":"test1"}'.json();
print( j["test"] );
var a = 10;
test(a,b) {
}
fn test1() {
}
int fn test2( int a ) {
}
class test {
a() {
}
b() {
}
static c() {
}
}
test::c();
var c = new test;
c.a();
var d = { test : [1,2,3,4,"test"] };
print( d.count() );
var f = ( a, b ) {
a();
}
f(() {
}, 10);
if( a ) {
}
for(;;) {
}
while() {
}
<?
var arr = [ [ 'id' => 1 ] ];
for( k,v in arr ) {
?>
<li><?=v['id']?></li>
<? } ?>