<?php
function transform($lesson){
return [
"title" => $lesson["title"],
"content" => $lesson["body"],
"is_free" => (boolean) $lesson["free"]
];
}
$lesson = array("title"=>"","body"=>"","free"=>1);
var_dump(transform($lesson));
//array("title"=>"","content"=>"","is_free"=>true)
?>
how does the return in the function change the key name of the original array? I don"t understand this usage.