3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("hello", "world", "foobar"); $value1 = "foobar"; $value2 = "test"; if(!in_array($value1, $array)) $array[] = $value1; // this will not be added because foobar already exists in the array if(!in_array($value2, $array)) $array[] = $value2; // this will be added because it does not exist in the array print_r($array); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 11
filename:       /in/Xdrem
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array, !1 = $value1, !2 = $value2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'foobar'
    4     2        ASSIGN                                                   !2, 'test'
    5     3        INIT_FCALL                                               'in_array'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7        BOOL_NOT                                         ~7      $6
          8      > JMPZ                                                     ~7, ->11
          9    >   ASSIGN_DIM                                               !0
         10        OP_DATA                                                  !1
    6    11    >   INIT_FCALL                                               'in_array'
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $9      
         15        BOOL_NOT                                         ~10     $9
         16      > JMPZ                                                     ~10, ->19
         17    >   ASSIGN_DIM                                               !0
         18        OP_DATA                                                  !2
    7    19    >   INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
    8    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.45 ms | 1395 KiB | 17 Q