The optical memristive switches are electrically activated optical switches that can memorize the current state. They can be used as optical latching switches in which the switching state is changed only by applying an electrical Write/Erase pulse and maintained without external power supply.We demonstrate an optical memristive switch based on a silicon MMI structure covered with nanoscale-size Ge2Sb2Te5 (GST) material on top. The phase change of GST is triggered by resistive heating of the silicon layer beneath GST with an electrical pulse. Experimental results reveal that the optical transmissivity can be tuned in a controllable and repeatable manner with the maximum transmission contrast exceeding 20 dB. Partial crystallization of GST is obtained by controlling the width and amplitude of the electric pulses. Crucially, we also demonstrate that both Erase and Write operations, to and from any intermediate level, are possible with accurate control of the electrical pulses. Our work marks a significant step forward towards realizing photonic memristive switches without static power consumption, which are highly demanded in highdensity large-scale integrated photonics.