3v4l.org

run code in 300+ PHP versions simultaneously
<?php $people = array("Peter", "Joe", "Glenn", "Cleveland"); if (in_array("Joe", $people)) { if(count($people == 3)){ $people = ["1","2","3","4"]; $people['keyhave'] = $people; }else if(count($people == 5 )){ $people = "string is here"; $people['keyhave'] = $people; } } var_dump($people['keyhave']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 21
filename:       /in/JnqhL
function name:  (null)
number of ops:  26
compiled vars:  !0 = $people
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 'Joe'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->21
    8     6    >   IS_EQUAL                                         ~3      !0, 3
          7        COUNT                                            ~4      ~3
          8      > JMPZ                                                     ~4, ->14
    9     9    >   ASSIGN                                                   !0, <array>
   10    10        QM_ASSIGN                                        ~7      !0
         11        ASSIGN_DIM                                               !0, 'keyhave'
         12        OP_DATA                                                  ~7
         13      > JMP                                                      ->21
   11    14    >   IS_EQUAL                                         ~8      !0, 5
         15        COUNT                                            ~9      ~8
         16      > JMPZ                                                     ~9, ->21
   12    17    >   ASSIGN                                                   !0, 'string+is+here'
   13    18        QM_ASSIGN                                        ~12     !0
         19        ASSIGN_DIM                                               !0, 'keyhave'
         20        OP_DATA                                                  ~12
   20    21    >   INIT_FCALL                                               'var_dump'
         22        FETCH_DIM_R                                      ~13     !0, 'keyhave'
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.52 ms | 1395 KiB | 17 Q