3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('', 0, false, 1, 'false', null, '0', true, 1, '1'); foreach($a as $i => $val) { echo "$val : \n"; $b = (isset($a[$i]) && (bool) $a[$i]); var_dump($b); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/7OsTl
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $val, !2 = $i, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $5      !0, ->17
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->17
          3    >   ASSIGN                                                   !2, ~6
    6     4        NOP                                                      
          5        FAST_CONCAT                                      ~8      !1, '+%3A+%0A'
          6        ECHO                                                     ~8
          7        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      !0, !2
          8      > JMPZ_EX                                          ~9      ~9, ->12
          9    >   FETCH_DIM_R                                      ~10     !0, !2
         10        BOOL                                             ~11     ~10
         11        BOOL                                             ~9      ~11
         12    >   ASSIGN                                                   !3, ~9
    7    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
    5    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $5
    8    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.72 ms | 1399 KiB | 15 Q