3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'je kan van alles doen maar jemoeder blijft dik'; $parts = explode(' ', $string); foreach($parts as $index => $part){ if($part === 'maar'){ echo $parts[$index+1]; } } preg_match('/maar\s+([\w-]+)/', $string, $result); echo $result[1];
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 15
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/Ji9oD
function name:  (null)
number of ops:  24
compiled vars:  !0 = $string, !1 = $parts, !2 = $part, !3 = $index, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'je+kan+van+alles+doen+maar+jemoeder+blijft+dik'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    5     6      > FE_RESET_R                                       $8      !1, ->15
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->15
          8    >   ASSIGN                                                   !3, ~9
    6     9        IS_IDENTICAL                                             !2, 'maar'
         10      > JMPZ                                                     ~11, ->14
    8    11    >   ADD                                              ~12     !3, 1
         12        FETCH_DIM_R                                      ~13     !1, ~12
         13        ECHO                                                     ~13
    5    14    > > JMP                                                      ->7
         15    >   FE_FREE                                                  $8
   12    16        INIT_FCALL                                               'preg_match'
         17        SEND_VAL                                                 '%2Fmaar%5Cs%2B%28%5B%5Cw-%5D%2B%29%2F'
         18        SEND_VAR                                                 !0
         19        SEND_REF                                                 !4
         20        DO_ICALL                                                 
   13    21        FETCH_DIM_R                                      ~15     !4, 1
         22        ECHO                                                     ~15
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.9 ms | 1395 KiB | 17 Q