Skip to content

Commit 67f85a5

Browse files
authored
Merge pull request #5 from roelofjan-elsinga/master
README Updates
2 parents 9667f2e + 6a17b19 commit 67f85a5

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,29 @@ php-go allows to call Go code from PHP, with minimal code boilerplate.
2020

2121
## Install
2222

23-
#### PHP ext:
23+
You can download this package using "go get". When using "go get", you'll have to [set your $GOPATH](https://github.com/golang/go/wiki/SettingGOPATH) first.
24+
Then you can run:
2425

25-
cd ext
26-
phpize && ./configure && make && sudo make install
26+
```
27+
go get github.com/arnaud-lb/php-go
28+
```
29+
30+
When this is finished, change directories to the included "ext" folder:
31+
32+
```
33+
cd $GOPATH/src/github.com/arnaud-lb/php-go/ext
34+
```
35+
36+
Then configure and make the binary:
37+
38+
```
39+
phpize && ./configure && make && sudo make install
40+
```
2741

2842
Then add ``extension=phpgo.so`` to your php.ini, or call php with ``-dextension=phpgo.so``
2943

3044
Note: php-go supports PHP 7 (non-ZTS). For PHP 5, use the php5 branch.
3145

32-
#### Go module:
33-
34-
go get github.com/arnaud-lb/php-go/php-go
35-
3646
## Usage
3747

3848
#### Exporting Go functions
@@ -49,7 +59,7 @@ import (
4959
var _ = php.Export("example", map[string]interface{}{
5060
"toUpper": strings.ToUpper,
5161
"takeOverTheWorld": TakeOverTheWorld,
52-
}
62+
})
5363

5464
func TakeOverTheWorld() {
5565
}
@@ -76,4 +86,3 @@ ReflectionClass::export($module);
7686
// Call some method
7787
$module->toUpper("foo");
7888
```
79-

0 commit comments

Comments
 (0)