3v4l.org

run code in 300+ PHP versions simultaneously
<?php function executaPermissoes($cliente, $usuario, $clientesPermitidos = array()) { if ( ! empty($clientesPermitidos) && ! in_array($cliente, $clientesPermitidos)) { return false; } return 'Executou a função'; } $clientesPermitidos = array(10001, 10761); $cliente = 99999; $usuario = 2; var_dump( executaPermissoes($cliente, $usuario, $clientesPermitidos) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/56nXj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $clientesPermitidos, !1 = $cliente, !2 = $usuario
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, 99999
   15     2        ASSIGN                                                   !2, 2
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'executapermissoes'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0  $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function executapermissoes:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/56nXj
function name:  executaPermissoes
number of ops:  16
compiled vars:  !0 = $cliente, !1 = $usuario, !2 = $clientesPermitidos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      <array>
    6     3        ISSET_ISEMPTY_CV                                 ~3      !2
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ_EX                                          ~4      ~4, ->12
          6    >   INIT_FCALL                                               'in_array'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $5      
         10        BOOL_NOT                                         ~6      $5
         11        BOOL                                             ~4      ~6
         12    > > JMPZ                                                     ~4, ->14
    7    13    > > RETURN                                                   <false>
   10    14    > > RETURN                                                   'Executou+a+fun%C3%A7%C3%A3o'
   11    15*     > RETURN                                                   null

End of function executapermissoes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.98 ms | 1390 KiB | 18 Q