3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array('a'=>'foo','b'=>null,'c'=>'bar','d'=>''); foreach ($values as $field=>&$value) { if ($value === null || $value == '') { echo "$field is NULL,"; $value = null; continue; } $value = 'OK:'.$value; } var_dump($values); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/TF5DN
function name:  (null)
number of ops:  22
compiled vars:  !0 = $values, !1 = $value, !2 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1      > FE_RESET_RW                                      $4      !0, ->17
          2    > > FE_FETCH_RW                                      ~5      $4, !1, ->17
          3    >   ASSIGN                                                   !2, ~5
    4     4        TYPE_CHECK                                    2  ~7      !1
          5      > JMPNZ_EX                                         ~7      ~7, ->8
          6    >   IS_EQUAL                                         ~8      !1, ''
          7        BOOL                                             ~7      ~8
          8    > > JMPZ                                                     ~7, ->14
    5     9    >   NOP                                                      
         10        FAST_CONCAT                                      ~9      !2, '+is+NULL%2C'
         11        ECHO                                                     ~9
    6    12        ASSIGN                                                   !1, null
    7    13      > JMP                                                      ->2
    9    14    >   CONCAT                                           ~11     'OK%3A', !1
         15        ASSIGN                                                   !1, ~11
    3    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $4
   11    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   12    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.87 ms | 1395 KiB | 15 Q