3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(Array('b','d'), Array('c','a'), Array('b','d'), Array('a','d'), Array('c'), Array('c'), Array('a','d','e'), Array('d','b') ); function array_count_values_of($value, $array) { $counts = array_count_values($array); return $counts[$value]; } for($i=0 ; $i<count($array2) ; $i++) { $temp = array_count_values_of($array2[$i], $array); $result[$i][0] = $array2[$i]; $result[$i][1] = $temp; } print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 3
Branch analysis from position: 20
Branch analysis from position: 3
filename:       /in/QDEjI
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $i, !2 = $temp, !3 = $array2, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->17
   18     3    >   INIT_FCALL                                               'array_count_values_of'
          4        FETCH_DIM_R                                      ~7      !3, !1
          5        SEND_VAL                                                 ~7
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !2, $8
   19     9        FETCH_DIM_R                                      ~12     !3, !1
         10        FETCH_DIM_W                                      $10     !4, !1
         11        ASSIGN_DIM                                               $10, 0
         12        OP_DATA                                                  ~12
   20    13        FETCH_DIM_W                                      $13     !4, !1
         14        ASSIGN_DIM                                               $13, 1
         15        OP_DATA                                                  !2
   16    16        PRE_INC                                                  !1
         17    >   COUNT                                            ~16     !3
         18        IS_SMALLER                                               !1, ~16
         19      > JMPNZ                                                    ~17, ->3
   23    20    >   INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Function array_count_values_of:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QDEjI
function name:  array_count_values_of
number of ops:  9
compiled vars:  !0 = $value, !1 = $array, !2 = $counts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        INIT_FCALL                                               'array_count_values'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !2, $3
   14     6        FETCH_DIM_R                                      ~5      !2, !0
          7      > RETURN                                                   ~5
   15     8*     > RETURN                                                   null

End of function array_count_values_of

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.67 ms | 1398 KiB | 18 Q