When i put a file inside the readline, i want that the pathinfo() show me its extension. But i want to add this code inside my function.
Let me show you my code :
function returnIcon($parts) {
$extension = $parts['extension'];
return $extension;
}
$pathinfo = pathinfo(readline('file name : '));
echo 'Extension: '.returnIcon($pathinfo);
so i want that my "pathinfo(readline( ..." work inside my function "returnIcon". I need to did it to use infinite loop on the readline when the input is false.
i am really stuck :/