3v4l.org

run code in 300+ PHP versions simultaneously
<?php $os = array('bar' => 'baz'); if (in_array("bar", $os)) { echo "trouve"; $key = array_search('baz', $os); echo $key; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/njhu0
function name:  (null)
number of ops:  14
compiled vars:  !0 = $os, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 'bar'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5      > JMPZ                                                     $3, ->13
    6     6    >   ECHO                                                     'trouve'
    7     7        INIT_FCALL                                               'array_search'
          8        SEND_VAL                                                 'baz'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !1, $4
    8    12        ECHO                                                     !1
    9    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.27 ms | 1394 KiB | 17 Q