If the field are added with the UI then this is usually the place to add conditional logic.
Conditional logic can be altered in PHP by using an acf/prepare_field filter.
The best way to see how the conditional logic argument is constructed it to create some fields with conditional logic and export them to PHP.