3v4l.org

run code in 300+ PHP versions simultaneously
<?php function safeEval($haystack,$needle,$return) { str_ireplace($needle,"' '",$haystack); $return = $haystack; return eval($haystack); //return; } $string = array("Hello","drop","Kyle").";"; $find = array("Drop"); safeEval($string,$find);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oIpEU
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string, !1 = $find
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   CAST                                          6  ~2      <array>
          1        CONCAT                                           ~3      ~2, '%3B'
          2        ASSIGN                                                   !0, ~3
   11     3        ASSIGN                                                   !1, <array>
   12     4        INIT_FCALL                                               'safeeval'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !1
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function safeeval:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oIpEU
function name:  safeEval
number of ops:  12
compiled vars:  !0 = $haystack, !1 = $needle, !2 = $return
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        INIT_FCALL                                               'str_ireplace'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 '%27+%27'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    5     8        ASSIGN                                                   !2, !0
    6     9        INCLUDE_OR_EVAL                                  $5      !0, EVAL
         10      > RETURN                                                   $5
    8    11*     > RETURN                                                   null

End of function safeeval

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.49 ms | 1401 KiB | 16 Q