GO LANG FOR PHP PROGRAMMER

Conversion

Example 1

package main
func main(){
    var variable float64 = 1.2
    var i int = int(variable)
}
<?php
$variable=1.2;
$i=(int)$variable;

Example 2

package main

import "fmt"

func main() {
    var variable interface{} = 1.2
    i := variable.(float64)
    fmt.Println(i)
}
<?php
$variable=1.2;
$i=(float)$variable;
echo $i;