3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=array("", " ", 0, false, array(), "45"); $r=''; foreach($a as $i => $s) if (trim($s) == "") $r.=$i; echo $r;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/QIj2a
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $r, !2 = $s, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ASSIGN                                                   !0, <array>
    2     1        ASSIGN                                                   !1, ''
    3     2      > FE_RESET_R                                       $6      !0, ->12
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->12
          4    >   ASSIGN                                                   !3, ~7
    4     5        INIT_FCALL                                               'trim'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $9      
          8        IS_EQUAL                                                 $9, ''
          9      > JMPZ                                                     ~10, ->11
    5    10    >   ASSIGN_OP                                     8          !1, !3
    3    11    > > JMP                                                      ->3
         12    >   FE_FREE                                                  $6
    6    13        ECHO                                                     !1
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.8 ms | 1395 KiB | 15 Q