function getExtension($file){
$exts = [];
foreach($file as $f){
$info = pathinfo($f);
//print_r($info);
$exts []= $info['extension'];
}
return $exts;
};
print_r(getExtension(["ruby.rb", "cplusplus.cpp", "python.py", "javascript.js"]));
print_r(getExtension(["code.html", "code.css"]));