3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 'string_empty' => '', 'string_bool_f' => 'false', 'string_bool_t' => 'true', 'int_0' => 0, 'int_1' => 1, 'int_neg' => -100, 'int_norm' => 100, 'array_empty' => [], 'array_null_val' => [null], ); foreach ($values as $name => $val) { $is_empty = empty($val) ? 'is' : 'isn\'t'; echo "$name $is_empty considered empty.".PHP_EOL; }
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 = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/geFbF
function name:  (null)
number of ops:  19
compiled vars:  !0 = $values, !1 = $val, !2 = $name, !3 = $is_empty
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1      > FE_RESET_R                                       $5      !0, ->17
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->17
          3    >   ASSIGN                                                   !2, ~6
   16     4        ISSET_ISEMPTY_CV                                         !1
          5      > JMPZ                                                     ~8, ->8
          6    >   QM_ASSIGN                                        ~9      'is'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~9      'isn%27t'
          9    >   ASSIGN                                                   !3, ~9
   18    10        ROPE_INIT                                     4  ~12     !2
         11        ROPE_ADD                                      1  ~12     ~12, '+'
         12        ROPE_ADD                                      2  ~12     ~12, !3
         13        ROPE_END                                      3  ~11     ~12, '+considered+empty.'
         14        CONCAT                                           ~14     ~11, '%0A'
         15        ECHO                                                     ~14
   15    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $5
   19    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.26 ms | 1394 KiB | 13 Q