Now that the source scripts have been moved to \lib, they can determine the position of the PHP library relative to themselves.
These are not called directly as programs but used in a library fashion by the installed utilities. So the library directory is a better place.