Answer the question
In order to leave comments, you need to log in
How to create a library on go and use via php?
There is a site in php, the possibility of using functions written in go is of interest.
something like this:
1) golang has a function
func Hello(name string) (string){
return "hello "+name
}
inlude ("some-bridge-file");
echo hello("world");
Answer the question
In order to leave comments, you need to log in
I would suggest that the part that needs to be written in go be made a separate service, where to access via http api.
options with compilation to dll, transpilation to js and extension for php seem to me not very successful.
You can build go code as a php extension
https://github.com/kitech/php-go
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question