Strange 5 second pause with PHP command line interface (related to mysql/mysqli extension)
it's a bug in mysql. you can solve it by getting the latest libmysql.dll (5.1.31 or higher. some older versions also work - see second link). make sure that's the libmysql.dll actually used and there are no other libmysql.dlls in your path. see the related php issue for details.
For me (Zend Server CE on Mac OS X), the imap exetension was the culprit. Disabling it solved the problem.
Anoyone wants to write a PHP extension bisecting script? :)
I also experienced an annoying 2 second delay running PHP from the command line under Windows 7 64bit.
This version had a delay:
php.exe (v5.3.5) shipped with ZendServer Community Edition
This version was wonderfully quick:
php.exe (v5.3.6) shipped with EasyPHP
(Sorry to bump an ancient thread, but hopefully this helps others Googling this issue.)