PHP-style utility functions for LuaJIT applications
- str_pad
- genid 获取一个唯一的ID
- trim
- rtrim
- ltrim
- split
- strncmp
- explode
- hash(key, seed)
- ip2long
- long2ip
- ctype_upper
- ctype_lower
- ctype_alpha
- ctype_alnum
- ctype_lower
- ctype_digit
- addslashes
- stripslashesa
- xxtea_decrypt
- xxtea_encrypt
gcc -O3 -shared -fPIC -I/usr/local/include/luajit-2.0/ -c -o php.o php.c gcc -O3 -shared -fPIC -I/usr/local/include/luajit-2.0/ -ansi -pedantic -Wall -o php.so php.o
luajit-2.0.2 test.lua