3v4l.org

run code in 300+ PHP versions simultaneously
<?php $b= 1234; $your_variable = '<input name="LFMIdsite" value="8635" type="hidden">'; $result = preg_replace('/name="LFMIdsite" value="(.*?)"/', $b, $your_variable); echo $result; //$lidsite = $matches[1]; //echo $lidsite; //$your_variable = str_replace('/name="LFMIdsite" value="'.$lidsite.'"', '/name="LFMIdsite" value="'.$b.'"', $your_variable); //echo $your_variable;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AnEe7
function name:  (null)
number of ops:  10
compiled vars:  !0 = $b, !1 = $your_variable, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1234
    4     1        ASSIGN                                                   !1, '%3Cinput+name%3D%22LFMIdsite%22+value%3D%228635%22+type%3D%22hidden%22%3E'
    6     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2Fname%3D%22LFMIdsite%22+value%3D%22%28.%2A%3F%29%22%2F'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
    8     8        ECHO                                                     !2
   16     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.62 ms | 1385 KiB | 15 Q