25 lines
391 B
PHP
25 lines
391 B
PHP
#!/usr/bin/php
|
|
|
|
<?php
|
|
|
|
function syscall($callable=null){
|
|
|
|
/* (1) Check file */
|
|
if( !file_exists($callable) )
|
|
return null;
|
|
|
|
/* (2) Call and catch output */
|
|
ob_start();
|
|
|
|
include $callable;
|
|
|
|
$out = ob_get_clean();
|
|
|
|
/* (3) Manage content */
|
|
if( $out == 0 ) return true;
|
|
elseif( is_numeric($out) ) return false;
|
|
else return $out;
|
|
}
|
|
|
|
?>
|