<?php
class Solution {

    /**
     * @param Integer[] $nums
     * @param Integer $target
     * @return Integer[]
     */
    function twoSum($nums, $target) {
        foreach($nums as $key => $i ){
            $count = $i;
                foreach($nums as $key2 => $i2){
                    if($i + $i2 == $target){
                        return [$key , $key2];
                    }
                    $count = 0;
                }
        }
        
    }
}
$f = new Solution;
print_r($f->twoSum([2, 0, 6], 8));
