3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach ( explode( '/', $route ) as $part => $r ) { $uscore = strpos( $r, '_' ); $times = substr_count( $r, '_' ); if ( 1 != $times || 0 != $uscore ) { continue; } $found = $part; break; } echo $found;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 26
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 26
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 26
Branch analysis from position: 26
filename:       /in/Ng3am
function name:  (null)
number of ops:  29
compiled vars:  !0 = $route, !1 = $r, !2 = $part, !3 = $uscore, !4 = $times, !5 = $found
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '%2F'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4      > FE_RESET_R                                       $7      $6, ->26
          5    > > FE_FETCH_R                                       ~8      $7, !1, ->26
          6    >   ASSIGN                                                   !2, ~8
    4     7        INIT_FCALL                                               'strpos'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 '_'
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !3, $10
    5    12        INIT_FCALL                                               'substr_count'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 '_'
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !4, $12
    6    17        IS_NOT_EQUAL                                     ~14     !4, 1
         18      > JMPNZ_EX                                         ~14     ~14, ->21
         19    >   IS_NOT_EQUAL                                     ~15     !3, 0
         20        BOOL                                             ~14     ~15
         21    > > JMPZ                                                     ~14, ->23
    8    22    > > JMP                                                      ->5
   11    23    >   ASSIGN                                                   !5, !2
   12    24      > JMP                                                      ->26
    2    25*       JMP                                                      ->5
         26    >   FE_FREE                                                  $7
   15    27        ECHO                                                     !5
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.96 ms | 1388 KiB | 19 Q