3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'test'; $arr = ['test','test2', 'test3', 'test4']; $found = []; while(false !== $key = !array_search($test, $arr)){ echo $key; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/OPhVp
function name:  (null)
number of ops:  14
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      > JMP                                                      ->5
    6     4    >   ECHO                                                     !3
    5     5    >   INIT_FCALL                                               'array_search'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        BOOL_NOT                                         ~8      $7
         10        ASSIGN                                           ~9      !3, ~8
         11        TYPE_CHECK                                  1018          ~9
         12      > JMPNZ                                                    ~10, ->4
    7    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.3 ms | 1399 KiB | 15 Q