3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSearchResult($str, $query, $numOfWordToAdd) { $lowered = strtolower($query); $str = str_replace($query,$lowered,$str); var_dump(array('lowered' => $lowered, 'str' => $str)); list($before, $after) = explode($lowered, $str); } $body = "<p>This is the body, KeyWoRd to be searched is here.</p>"; $keyword = "kEyword"; echo getSearchResult($body,$keyword,1); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K1OQc
function name:  (null)
number of ops:  9
compiled vars:  !0 = $body, !1 = $keyword
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, '%3Cp%3EThis+is+the+body%2C+KeyWoRd+to+be+searched+is+here.%3C%2Fp%3E'
   12     1        ASSIGN                                                   !1, 'kEyword'
   13     2        INIT_FCALL                                               'getsearchresult'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 1
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
   14     8      > RETURN                                                   1

Function getsearchresult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K1OQc
function name:  getSearchResult
number of ops:  28
compiled vars:  !0 = $str, !1 = $query, !2 = $numOfWordToAdd, !3 = $lowered, !4 = $before, !5 = $after
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    3     3        INIT_FCALL                                               'strtolower'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !3, $6
    4     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !3
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !0, $8
    6    13        INIT_FCALL                                               'var_dump'
         14        INIT_ARRAY                                       ~10     !3, 'lowered'
         15        ADD_ARRAY_ELEMENT                                ~10     !0, 'str'
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'explode'
         19        SEND_VAR                                                 !3
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $12     
         22        FETCH_LIST_R                                     $13     $12, 0
         23        ASSIGN                                                   !4, $13
         24        FETCH_LIST_R                                     $15     $12, 1
         25        ASSIGN                                                   !5, $15
         26        FREE                                                     $12
    9    27      > RETURN                                                   null

End of function getsearchresult

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.27 ms | 1390 KiB | 22 Q