I have a function which returns an array:
function myfunc(){
return ["status" => true];
}
And here is the usage:
if ( myfunc()['status'] ){
// do something
}
See? I have to get the status of myfunc()
like this myfunc()['status']
. All I'm trying to do is getting it like this myfunc()->status
. Any idea how can I modify the function to get the status like an object?