3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_in_string($haystack, $needle) { if (strpos($haystack, $needle) !== false) { return 1; } else { return 0; } } echo is_in_string("THis is a test", 4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hodqi
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'is_in_string'
          1        SEND_VAL                                                 'THis+is+a+test'
          2        SEND_VAL                                                 4
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function is_in_string:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hodqi
function name:  is_in_string
number of ops:  12
compiled vars:  !0 = $haystack, !1 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        TYPE_CHECK                                  1018          $2
          7      > JMPZ                                                     ~3, ->10
    5     8    > > RETURN                                                   1
          9*       JMP                                                      ->11
    7    10    > > RETURN                                                   0
    9    11*     > RETURN                                                   null

End of function is_in_string

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1397 KiB | 16 Q