3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getIndex($name) { $algorithm = null; if ($pos = stripos($name, '_USING_')) { $algorithm = 'gin'; } return $algorithm; } echo getIndex('textsearch_index_USING_GIN');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CVDFL
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'getindex'
          1        SEND_VAL                                                 'textsearch_index_USING_GIN'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function getindex:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/CVDFL
function name:  getIndex
number of ops:  11
compiled vars:  !0 = $name, !1 = $algorithm, !2 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, null
    5     2        INIT_FCALL                                               'stripos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '_USING_'
          5        DO_ICALL                                         $4      
          6        ASSIGN                                           ~5      !2, $4
          7      > JMPZ                                                     ~5, ->9
    6     8    >   ASSIGN                                                   !1, 'gin'
    8     9    > > RETURN                                                   !1
    9    10*     > RETURN                                                   null

End of function getindex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.85 ms | 1401 KiB | 16 Q