Im trying to call a variable that is being created in the function , how can i access this variable?
<?php
class youtube
{
public function details()
{
$test = "asdas";
}
}
$class = new youtube();
$s = $class->details()->test;
echo $s;
?>