3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "I need to replace = in string with == sign, but not in <=, != and >= signs."; echo preg_replace('/(?<![<>=!])=(?!=)/', '==', $string);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IpNN4
function name:  (null)
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'I+need+to+replace+%3D+in+string+with+%3D%3D+sign%2C+but+not+in+%3C%3D%2C+%21%3D+and+%3E%3D+signs.'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%3F%3C%21%5B%3C%3E%3D%21%5D%29%3D%28%3F%21%3D%29%2F'
          3        SEND_VAL                                                 '%3D%3D'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ECHO                                                     $2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
239.87 ms | 996 KiB | 14 Q