Sure - its 'possible'. That's what's in all those configration files.
Is it a GOOD idea?
Nooooo - each OS platform works differently -
Short, but accurate version -
Primary problem is that Windows and *nix versions of Apache (and thus PHP) work very differently at an excutable level. So the 'right settings' for a Windows install will not be good choices for a Mac (which is really Unix) or Linux box. Reason - Apache and PHp are co-compiled in OS and compiler dependent variations.
Are a few things worth 'keeping' - yes - if you have added to or modified PHP to add functions or extensions - you will need to know wht they are so you can enable the correct versions in the target OS. Some things won't translate, but most will. The OS's also have very different TCP/IP stacks - so tuning that part is different as well. Summing up - the php.ini, although it will be different, will have the same extensions and PHP options enabled. BTW - Perl (speaking of Perl Modules) is much less OS dependent, because it does not rely (as much) on the Apache compilation.
hope this helps..