If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
MFH:- Added long-option feature to getopt().
MFH:- Made getopt() available on win32 systems.
MFH: Patch by: David Soria Parra <dsp@php.net>
[DOC]: These changes will be available from 5.3+
# Note: Fixed also tests and synced basic_functions.c with HEAD.