Add CompareArrays helper function to help with nested arrays

This commit is contained in:
John Volk 2023-08-14 19:37:46 -04:00 committed by GitHub
parent 5752d9f393
commit d8183ce9fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,7 +288,13 @@ trait helperfunctions {
return $sccp_conf_init;
}
public function compareArrays(array $a, array $b){
if (array_diff_assoc($a, $b)===[]) {
return 0;
}
return ($a>$b)?1:-1;
}
public function checkTftpMapping(){
exec('in.tftpd -V', $tftpInfo);
$info['TFTP Server'] = array('Version' => 'Not Found', 'about' => 'Mapping not available');