Disclosed is a semiconductor laser that is constituted by at least one active layer sandwiched between two confinement layers with P and N type doping to constitute a PN junction. In at least one of the confinement layers and/or the active layer, holes are designed on each side of the cavity so as to form structures of photonic bandgap material along the lateral walls of the cavity and the ends of the cavity.