<?php
function someFunc($a){
var_dump($a);
throw new Exception('blaaaaaaaaaaaaaah');
};
function tryCatch($callable, ...$args){
try{
return $callable(...$args);
}catch(Exception $e){
return null;
//hehehe he he heh we do nothing what you gonna do he he
}
}
tryCatch('someFunc','jjj');
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
string(3) "jjj"