Maybe an extra 8 bytes of offset for line fseek($b,$f->addr); is needed in Catalina.
Try this.
<?php
function padHex($d,$l) {return str_pad(dechex($d),$l,'0',STR_PAD_LEFT);}
function toHex($s){$i=0;$t='';while(isset($s[$i])){$t.=padHex(ord($s[$i++]),2);}return $t;}
function...