3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array("nl", "net", "com"); $domain = explode(".", '.ne'); foreach($a as $c) { echo (strlen($domain[1]) - 1); if($c[(strlen($domain[1]) - 1)] == $domain[1]) { $matches[]= $c; } } if(!empty($matches)) { echo implode(',', $matches); } else { echo 'no matches'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 22
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 32
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/2NT4v
function name:  (null)
number of ops:  34
compiled vars:  !0 = $a, !1 = $domain, !2 = $c, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAL                                                 '.ne'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    4     6      > FE_RESET_R                                       $7      !0, ->22
          7    > > FE_FETCH_R                                               $7, !2, ->22
    5     8    >   FETCH_DIM_R                                      ~8      !1, 1
          9        STRLEN                                           ~9      ~8
         10        SUB                                              ~10     ~9, 1
         11        ECHO                                                     ~10
    6    12        FETCH_DIM_R                                      ~11     !1, 1
         13        STRLEN                                           ~12     ~11
         14        SUB                                              ~13     ~12, 1
         15        FETCH_DIM_R                                      ~14     !2, ~13
         16        FETCH_DIM_R                                      ~15     !1, 1
         17        IS_EQUAL                                                 ~14, ~15
         18      > JMPZ                                                     ~16, ->21
    7    19    >   ASSIGN_DIM                                               !3
         20        OP_DATA                                                  !2
    4    21    > > JMP                                                      ->7
         22    >   FE_FREE                                                  $7
   10    23        ISSET_ISEMPTY_CV                                 ~18     !3
         24        BOOL_NOT                                         ~19     ~18
         25      > JMPZ                                                     ~19, ->32
   11    26    >   INIT_FCALL                                               'implode'
         27        SEND_VAL                                                 '%2C'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $20     
         30        ECHO                                                     $20
         31      > JMP                                                      ->33
   13    32    >   ECHO                                                     'no+matches'
   14    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.22 ms | 1396 KiB | 17 Q