3v4l.org

run code in 300+ PHP versions simultaneously
<?php function doescontain($tocheck, $inlong){ preg_match("/$tocheck/", $inlong, $matches); return !empty($matches[0]); } $tocheck = 'zaba'; $inlong = 'dzamburu n koma baba n dingo'; $d = doescontain($tocheck, $inlong); var_dump($d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gCNgq
function name:  (null)
number of ops:  11
compiled vars:  !0 = $tocheck, !1 = $inlong, !2 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'zaba'
    9     1        ASSIGN                                                   !1, 'dzamburu+n+koma+baba+n+dingo'
   11     2        INIT_FCALL                                               'doescontain'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
   12     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function doescontain:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gCNgq
function name:  doescontain
number of ops:  14
compiled vars:  !0 = $tocheck, !1 = $inlong, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'preg_match'
          3        ROPE_INIT                                     3  ~4      '%2F'
          4        ROPE_ADD                                      1  ~4      ~4, !0
          5        ROPE_END                                      2  ~3      ~4, '%2F'
          6        SEND_VAL                                                 ~3
          7        SEND_VAR                                                 !1
          8        SEND_REF                                                 !2
          9        DO_ICALL                                                 
    5    10        ISSET_ISEMPTY_DIM_OBJ                         1  ~7      !2, 0
         11        BOOL_NOT                                         ~8      ~7
         12      > RETURN                                                   ~8
    6    13*     > RETURN                                                   null

End of function doescontain

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.83 ms | 1389 KiB | 18 Q