3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'test'; $arr = ['test','test2']; if(false !== $key = !array_search($test, $arr)){ echo $key; }
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
filename:       /in/uMlZT
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test, !1 = $arr, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'array_search'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        BOOL_NOT                                         ~6      $5
          7        ASSIGN                                           ~7      !2, ~6
          8        TYPE_CHECK                                  1018          ~7
          9      > JMPZ                                                     ~8, ->11
    5    10    >   ECHO                                                     !2
    6    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.63 ms | 1394 KiB | 15 Q