For me, running mysql_query('SELECT SLEEP(5)')
results in a ~5000ms self-cost for the php::mysql_query
function, so yes - it should report time spent waiting for the database.
Keep in mind though, using the xdebug profiler adds a lot of overhead to running PHP, so the proportion of time reportedly spent waiting for the database may not be the same as when running without the profiler (because the profiling of PHP doesn't add any overhead to the database engine itself).