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 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/9GLfo
function name:  (null)
number of ops:  11
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        ASSIGN                                           ~6      !2, $5
          7        TYPE_CHECK                                  1018          ~6
          8      > JMPZ                                                     ~7, ->10
    5     9    >   ECHO                                                     !2
    6    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.1 ms | 1394 KiB | 15 Q