I tested status.php return value with var_dump($result) and alerted it out in check() function like this:
function check() { $.ajax({
You're not sending the return value of the status() function back to PHP. Use:
status()
echo json_encode(status());
And change the AJAX call to expect a JSON response.
function check() { $.ajax({ url: "status.php", dataType: 'json' }).done(function(data) { alert(data); }); }