forked from awesee/php2go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
43 lines (23 loc) · 764 Bytes
/
main.go
File metadata and controls
43 lines (23 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"fmt"
"github.com/awesee/php2go/php"
)
func main() {
php.Echo("Hello ", "world!\n")
php.Print("This is a string.\n")
fmt.Println(php.Chr(65))
fmt.Println(php.Ord('A'))
fmt.Println(php.Array(1, 'a', "ABC"))
fmt.Println(php.Strrev("Hello world!"))
fmt.Println(php.Strrev("你好,世界"))
fmt.Println(php.ArrayReverse(php.Array(1, 'a', "ABC")))
fmt.Println(php.SysGetTempDir())
fmt.Println(php.IsNumeric("-123.45"))
fmt.Println(php.Basename("foo/bar.ext"))
fmt.Println(php.Addcslashes("abc/cde.ext", 'c'))
fmt.Println(php.Addslashes("abc/'\"c\\de.ext"))
fmt.Println(php.Htmlspecialchars("This is some <b>bold</b> text."))
fmt.Println(php.MbStrlen("你好,世界"))
fmt.Println(php.Intval("-123abc"))
}