In this paper, we propose an all optical logic gate based on a photonic crystals multimode interference (PC-MMI). The all optical logic gate with multifunctional performance has been designed theoretically in two-dimensional photonic crystals (PhCs) structure using multimode interference (MMI) principle. The PhCs consist of periodical air holes in silicon-on-insulator structure. The MMI using line defect waveguide is a 3×3 structure on the PhCs. By switching the optical signal to different input waveguide ports, the device can operate as NAND, NOT, NOR, and OR gates simultaneously or individually. In our optimum design, the width of MMI section is 4.8 μm and the length is 64 μm. The spacing between two line-defect waveguides is 1.2 μm. The total length of the device is 70 μm with an input length of 3.2 μm. It is 1/10 smaller size than conventional MMI optical logic device with nearby 1 mm. Therefore, switching speed is also enhanced by the reduced device size. Our proposed structure would be very useful for construction of optical circuit, optical computer, and future Si-based optical integrated circuits.