Photonic spin Hall effect is generally described as a spin-dependent splitting. Previous studies have focused on the transverse spin-dependent splitting of light field. In this work, a method of manipulating the longitudinal photonic spin Hall effect which is based on dynamic and Pancharatnam-Berry phase is proposed. The theoretical analysis demonstrates that the lens group consisting of a Pancharatnam-Berry phase lens and a dynamic lens has two spin-dependent foci. Firstly, because Pancharatnam-Berry phase is spin-dependent, the left- and right-handed circularly polarized component can respectively acquire a Pancharatnam-Berry phase with opposite sign when a linearly polarized light beam passes through the Pancharatnam-Berry phase lens with phase retardation
${\text{π}}$
. It leads one circularly polarized component to be focused and the other diverged. This is essentially the spin-dependent splitting of light field in momentum space, which is caused by Pancharatnam-Berry phase. And then, an ordinary lens is inserted behind the Pancharatnam-Berry phase lens to introduce a dynamic phase modulation. Due to dynamic phase being spin-independent, the constructed lens group can focus the photons with different spin states at different focal points longitudinally under the appropriate conditions. In other words, the lens group has two spin-dependent focal points. The two focal points split the photons with different spin states in the longitudinal direction. The longitudinal spin-dependent splitting is dependent on the focal lengths of the two lens and the distance between the two lenses. By changing the three parameters, arbitrary longitudinal spin-dependent splitting can be obtained. Lastly, an experimental system is set up to verify the theoretical results. The relationship between the spin-dependent splitting and the distance between the two lenses is measured. By introducing a Glan laser polarizer and a quarter wave-plate, the circularly polarized chirality of the light field at the focal point is also measured. These experimental results are all in good agreement with the theoretical analyses. These results are helpful in understanding the physical origin of photonic spin Hall effect and developing novel photonic devices based on photonic spin Hall effect.