3v4l.org

run code in 300+ PHP versions simultaneously
<?php $follow = "Peter, Franz, Spongebob"; $guyToUnfollow = 'Franz'; $people = explode(',', $follow); var_dump($people); foreach ($people as $key => $person) { $person = trim($person); if ($person == $guyToUnfollow) { unset($people[$key]); } } $follow = implode(',',$people); var_dump($follow);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 20
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/QEnHj
function name:  (null)
number of ops:  31
compiled vars:  !0 = $follow, !1 = $guyToUnfollow, !2 = $people, !3 = $person, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Peter%2C+Franz%2C+Spongebob'
    4     1        ASSIGN                                                   !1, 'Franz'
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    8    10      > FE_RESET_R                                       $10     !2, ->21
         11    > > FE_FETCH_R                                       ~11     $10, !3, ->21
         12    >   ASSIGN                                                   !4, ~11
    9    13        INIT_FCALL                                               'trim'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !3, $13
   10    17        IS_EQUAL                                                 !3, !1
         18      > JMPZ                                                     ~15, ->20
   11    19    >   UNSET_DIM                                                !2, !4
    8    20    > > JMP                                                      ->11
         21    >   FE_FREE                                                  $10
   15    22        INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '%2C'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $16     
         26        ASSIGN                                                   !0, $16
   17    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.44 ms | 1014 KiB | 17 Q