3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = ["a", "b"]; function search($input) { $result = $input; foreach($input as $a) foreach($input as $b) $result []= $a . $b; return array_walk(array_unique($result)); } echo json_encode(search($input));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u7Q0k
function name:  (null)
number of ops:  9
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'json_encode'
          2        INIT_FCALL                                               'search'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        ECHO                                                     $3
          8      > RETURN                                                   1

Function search:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/u7Q0k
function name:  search
number of ops:  21
compiled vars:  !0 = $input, !1 = $result, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, !0
    8     2      > FE_RESET_R                                       $5      !0, ->12
          3    > > FE_FETCH_R                                               $5, !2, ->12
    9     4    > > FE_RESET_R                                       $6      !0, ->10
          5    > > FE_FETCH_R                                               $6, !3, ->10
   10     6    >   CONCAT                                           ~8      !2, !3
          7        ASSIGN_DIM                                               !1
          8        OP_DATA                                                  ~8
    9     9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $6
    8    11      > JMP                                                      ->3
         12    >   FE_FREE                                                  $5
   12    13        INIT_FCALL                                               'array_walk'
         14        INIT_FCALL                                               'array_unique'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $9      
         17        SEND_VAR_NO_REF                               0          $9
         18        DO_ICALL                                         $10     
         19      > RETURN                                                   $10
   13    20*     > RETURN                                                   null

End of function search

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.39 ms | 1390 KiB | 20 Q