3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dados_top_visitas = [ [ 'cod_usuario' => 2, 'total_visitas' => 1, ], [ 'cod_usuario' => 3, 'total_visitas' => 1, ] ]; var_dump(in_array(3, array_column($dados_top_visitas, 'cod_usuario'), true)); echo PHP_EOL; // array_column: var_dump(array_column($dados_top_visitas, 'cod_usuario'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/muG72
function name:  (null)
number of ops:  22
compiled vars:  !0 = $dados_top_visitas
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'in_array'
          3        SEND_VAL                                                 3
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'cod_usuario'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
   17    13        ECHO                                                     '%0A'
   20    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'array_column'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 'cod_usuario'
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.78 ms | 1438 KiB | 16 Q