Field modification using PHP
A configurable or a base field? Either way, that's a perfect use case for using a list (string) field type, then you tell Drupal what the allowed values and its keys and labels are. Views will use that when displaying he field and everything will just work.

If you define your field in Code, instead of hardcoding the list in there, you can also specify a callback that will call your PHP function, in case you expect the list to change or if it is dynamic (allowed_values_function in the field storage settings). Although you can also turn that around and treat that field configuration as the canonical source for your information and if you need it in PHP, read it out from there.

If that is for some reason not an option, then you can implement a Views field Plugin and expose it to views using hook_views_data() hook. That's very likely a lot more complicated than using the right field Type for your use case, though.