3v4l.org

run code in 500+ 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:  5
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        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%28%3F%3C%21%5B%3C%3E%3D%21%5D%29%3D%28%3F%21%3D%29%2F', '%3D%3D'
          2        OP_DATA                                                      !0
          3        ECHO                                                         ~2
          4      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.29 ms | 2106 KiB | 13 Q