3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(array(1)); $b = array(array(2)); if (compare_consignment($a, $b)) { echo 'Mached'; } else { echo 'Not matched'; } function compare_consignment($original, $con) { if(count($original) != count($con)) { return FALSE; } foreach ($original as $val) { if (!in_array($val, $con)) { return FALSE; } } return TRUE; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YjTnJ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL_BY_NAME                                       'compare_consignment'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $4      
          6      > JMPZ                                                     $4, ->9
    6     7    >   ECHO                                                     'Mached'
          8      > JMP                                                      ->10
    9     9    >   ECHO                                                     'Not+matched'
   22    10    > > RETURN                                                   1

Function compare_consignment:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/YjTnJ
function name:  compare_consignment
number of ops:  21
compiled vars:  !0 = $original, !1 = $con, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        COUNT                                            ~3      !0
          3        COUNT                                            ~4      !1
          4        IS_NOT_EQUAL                                             ~3, ~4
          5      > JMPZ                                                     ~5, ->7
   14     6    > > RETURN                                                   <false>
   16     7    > > FE_RESET_R                                       $6      !0, ->18
          8    > > FE_FETCH_R                                               $6, !2, ->18
   17     9    >   INIT_FCALL                                               'in_array'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        BOOL_NOT                                         ~8      $7
         14      > JMPZ                                                     ~8, ->17
   18    15    >   FE_FREE                                                  $6
         16      > RETURN                                                   <false>
   16    17    > > JMP                                                      ->8
         18    >   FE_FREE                                                  $6
   21    19      > RETURN                                                   <true>
   22    20*     > RETURN                                                   null

End of function compare_consignment

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.12 ms | 1400 KiB | 15 Q