3v4l.org

run code in 300+ PHP versions simultaneously
<?php function thing(array $needle, $haystack) { $haystack = array($haystack); foreach ($needle as $a) { $target = []; foreach ($haystack as $h) { $target = array_merge($target, explode($a, $h)); } $haystack = $target; } return array_merge(array_filter($haystack), $needle); } var_dump(thing(array('THIS', 'test', 'hello', 'A', 'is'), 'helloTHISisAblindtest'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cRmae
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'thing'
          2        SEND_VAL                                                 <array>
          3        SEND_VAL                                                 'helloTHISisAblindtest'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function thing:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 22
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 22
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/cRmae
function name:  thing
number of ops:  32
compiled vars:  !0 = $needle, !1 = $haystack, !2 = $a, !3 = $target, !4 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_ARRAY                                       ~5      !1
          3        ASSIGN                                                   !1, ~5
    7     4      > FE_RESET_R                                       $7      !0, ->22
          5    > > FE_FETCH_R                                               $7, !2, ->22
    8     6    >   ASSIGN                                                   !3, <array>
   10     7      > FE_RESET_R                                       $9      !1, ->19
          8    > > FE_FETCH_R                                               $9, !4, ->19
   11     9    >   INIT_FCALL                                               'array_merge'
         10        SEND_VAR                                                 !3
         11        INIT_FCALL                                               'explode'
         12        SEND_VAR                                                 !2
         13        SEND_VAR                                                 !4
         14        DO_ICALL                                         $10     
         15        SEND_VAR                                                 $10
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
   10    18      > JMP                                                      ->8
         19    >   FE_FREE                                                  $9
   14    20        ASSIGN                                                   !1, !3
    7    21      > JMP                                                      ->5
         22    >   FE_FREE                                                  $7
   17    23        INIT_FCALL                                               'array_merge'
         24        INIT_FCALL                                               'array_filter'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $14     
         27        SEND_VAR                                                 $14
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $15     
         30      > RETURN                                                   $15
   18    31*     > RETURN                                                   null

End of function thing

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.07 ms | 1403 KiB | 22 Q