3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func($c, $d) { $result = array_search($d, $c); if (result !== false) { return $result; } } $c=[1,2,4,8,18,20,33,66,99]; echo func($c, 19);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M6Xmb
function name:  (null)
number of ops:  7
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'func'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 19
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

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

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.89 ms | 1397 KiB | 16 Q