3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new StdClass(); $b = new StdClass(); $array1 = array($a, $a, $b); $array2 = array($a, $b, $b); $count1 = array(); foreach ($array1 as $val) { $hash = spl_object_hash($val); if (! isset($count1[$hash])) { $count1[$hash] = 0; } $count1[$hash]++; } var_dump($count1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 29
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 29
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 26
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/1br6v
function name:  (null)
number of ops:  34
compiled vars:  !0 = $a, !1 = $b, !2 = $array1, !3 = $array2, !4 = $count1, !5 = $val, !6 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $7      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $7
    4     3        NEW                                              $10     'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $10
    5     6        INIT_ARRAY                                       ~13     !0
          7        ADD_ARRAY_ELEMENT                                ~13     !0
          8        ADD_ARRAY_ELEMENT                                ~13     !1
          9        ASSIGN                                                   !2, ~13
    6    10        INIT_ARRAY                                       ~15     !0
         11        ADD_ARRAY_ELEMENT                                ~15     !1
         12        ADD_ARRAY_ELEMENT                                ~15     !1
         13        ASSIGN                                                   !3, ~15
    8    14        ASSIGN                                                   !4, <array>
   10    15      > FE_RESET_R                                       $18     !2, ->29
         16    > > FE_FETCH_R                                               $18, !5, ->29
   11    17    >   INIT_FCALL                                               'spl_object_hash'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $19     
         20        ASSIGN                                                   !6, $19
   12    21        ISSET_ISEMPTY_DIM_OBJ                         0  ~21     !4, !6
         22        BOOL_NOT                                         ~22     ~21
         23      > JMPZ                                                     ~22, ->26
   13    24    >   ASSIGN_DIM                                               !4, !6
         25        OP_DATA                                                  0
   16    26    >   FETCH_DIM_RW                                     $24     !4, !6
         27        PRE_INC                                                  $24
   10    28      > JMP                                                      ->16
         29    >   FE_FREE                                                  $18
   19    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !4
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.85 ms | 1396 KiB | 17 Q