php56: improve phpdbg logic