So long as its the same PHP version, it will work flawlessly assuming that all required packages are available for the extensions if you have any (which you probably do since the basic PHP doesn't include even dbms extensions).
All and all it will likely work for even an older version or a newer version. I recall trying this years and years ago, and I can't recall if it even triggers a warning in any log file for a directive it didn't understand (if it does, it'd probably be an E_CORE level error, but don't think it blocked).
Directives doesn't actually get added / removed all that often, so you may want to simply glance at the change log for the php version to see if anything new is added or old removed between the versions in use. If so, remove them from the copy, and add anything missing.
Oh, and there are a few filepath configurations as well. Chances are on an upgraded software package, those will mainly be the same since they'll be paths to sessions and temporary locations, but don't forget about those in case you did change the paths.
header('HTTP/1.1 420 Enhance Your Calm');