3v4l.org

run code in 300+ PHP versions simultaneously
<?php function search($input) { $result = $input; for($a=0;$a<count($input);$a++) { print "1"; } foreach($input as $a) foreach($input as $b) $result []= $a . $b; return array_filter(array_unique($result)); } print json_encode(search(["a", "b"])) . "\n"; print json_encode(search(["a", "b", "c"]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gjji5
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'json_encode'
          1        INIT_FCALL                                               'search'
          2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                         $1      
          6        CONCAT                                           ~2      $1, '%0A'
          7        ECHO                                                     ~2
   20     8        INIT_FCALL                                               'json_encode'
          9        INIT_FCALL                                               'search'
         10        SEND_VAL                                                 <array>
         11        DO_FCALL                                      0  $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14        ECHO                                                     $4
         15      > RETURN                                                   1

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

End of function search

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.03 ms | 1403 KiB | 21 Q