3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'test'; $arr = ['test','test2', 'test3', 'test4']; $found = []; if(false !== $key = !array_search($test, $arr)){ $found[] = $key; } print_r($found);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/W589Q
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test, !1 = $arr, !2 = $found, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        INIT_FCALL                                               'array_search'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        BOOL_NOT                                         ~8      $7
          8        ASSIGN                                           ~9      !3, ~8
          9        TYPE_CHECK                                  1018          ~9
         10      > JMPZ                                                     ~10, ->13
    6    11    >   ASSIGN_DIM                                               !2
         12        OP_DATA                                                  !3
    8    13    >   INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.31 ms | 1398 KiB | 17 Q