Use foreach loop rather than array_map() to invoke do_hook() callbacks

array_map( 'call_user_func', $hooks ) causes segmentation faults on PHP 5.5.12.