Photonic neuromorphic computing has emerged as a promising approach to building a low-latency and energy-efficient non-von Neuman computing system. A photonic spiking neural network (PSNN) exploits brain-like spatiotemporal processing to realize high-performance neuromorphic computing. However, the nonlinear computation of a PSNN remains a significant challenge. Here, we propose and fabricate a photonic spiking neuron chip based on an integrated Fabry–Perot laser with a saturable absorber (FP-SA). The nonlinear neuron-like dynamics including temporal integration, threshold and spike generation, a refractory period, inhibitory behavior and cascadability are experimentally demonstrated, which offers an indispensable fundamental building block to construct the PSNN hardware. Furthermore, we propose time-multiplexed temporal spike encoding to realize a functional PSNN far beyond the hardware integration scale limit. PSNNs with single/cascaded photonic spiking neurons are experimentally demonstrated to realize hardware-algorithm collaborative computing, showing the capability to perform classification tasks with a supervised learning algorithm, which paves the way for a multilayer PSNN that can handle complex tasks.