We consider a new embedded Markov chain for the PH/G/1 queue by recording the queue length, the phase of the arrival process and the number of services completed during the current busy period at the successive departure epochs. Algorithmically tractable matrix formulas are obtained which permit the analysis of the fluctuations of the queue length and waiting times during a typical busy cycle. These are useful in the computation of certain profile curves arising in the statistical analysis of queues. In addition, informative expressions for the mean waiting times in the stable GI/G/1 queue and a simple new algorithm to evaluate the waiting-time distributions for the stationary PH/PH/1 queue are obtained.