3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $arr = array(); for($i = 0; $i <= 100; $i++){ $arr[$i] = rand(0, 1000); } echo 'key is $arr['.array_search(123, $arr).']'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
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/NM2tW
function name:  (null)
number of ops:  21
compiled vars:  !0 = $i, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !0, 0
          3      > JMP                                                      ->11
    5     4    >   INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1000
          7        DO_ICALL                                         $6      
          8        ASSIGN_DIM                                               !1, !0
          9        OP_DATA                                                  $6
    4    10        PRE_INC                                                  !0
         11    >   IS_SMALLER_OR_EQUAL                                      !0, 100
         12      > JMPNZ                                                    ~8, ->4
    7    13    >   INIT_FCALL                                               'array_search'
         14        SEND_VAL                                                 123
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $9      
         17        CONCAT                                           ~10     'key+is+%24arr%5B', $9
         18        CONCAT                                           ~11     ~10, '%5D'
         19        ECHO                                                     ~11
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.52 ms | 1395 KiB | 17 Q