When upgrading to v5 from v4 do both have to be running the same version of php?
No, it isn’t necessary to run the same versions, however you’ll want to make sure each version is running a compatible version of PHP. for 4.5.48 it is PHP 7.4 and for 5.3.xx it is PHP 8.0