If I knew how to make our php5 include that function, I'd change the port to do that. :) I have a feeling it's because we use --disable-all and then just enable what we want; I just need to find what switch will re-enable that function.

PHP is looking for the nanosleep C function in the "rt" (realtime) library, but there is no such library on Mac OS X, leading to this error in the config.log and the test for existence of the nanosleep C function failing, and therefore php5 being built without the time_nanosleep PHP function:

ld: library not found for -lrt

The fix for ​PHP bug 50345 might be the culprit. I'll see if I can fix it by reversing the change, and I'll report the problem to the developers of PHP.