3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 'bool_f' => false, 'bool_t' => true, '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(), 'array_null_val' => array(null), 'obj_empty' => new stdClass(), ); $mask = "%-15.15s %7.7s\n"; // Print header printf($mask, 'Name', 'Empty'); echo PHP_EOL; foreach ($values as $name => $val) { $empty = empty($val) ? 'true' : 'false'; printf($mask, $name, $empty); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 37
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 37
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/kH3X3
function name:  (null)
number of ops:  39
compiled vars:  !0 = $values, !1 = $mask, !2 = $val, !3 = $name, !4 = $empty
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~5      <false>, 'bool_f'
          1        ADD_ARRAY_ELEMENT                                ~5      <true>, 'bool_t'
    6     2        ADD_ARRAY_ELEMENT                                ~5      '', 'string_empty'
    7     3        ADD_ARRAY_ELEMENT                                ~5      'false', 'string_bool_f'
    8     4        ADD_ARRAY_ELEMENT                                ~5      'true', 'string_bool_t'
    9     5        ADD_ARRAY_ELEMENT                                ~5      0, 'int_0'
   10     6        ADD_ARRAY_ELEMENT                                ~5      1, 'int_1'
    4     7        ADD_ARRAY_ELEMENT                                ~5      -100, 'int_neg'
   12     8        ADD_ARRAY_ELEMENT                                ~5      100, 'int_norm'
    4     9        ADD_ARRAY_ELEMENT                                ~5      <array>, 'array_empty'
         10        ADD_ARRAY_ELEMENT                                ~5      <array>, 'array_null_val'
   15    11        NEW                                              $6      'stdClass'
         12        DO_FCALL                                      0          
         13        ADD_ARRAY_ELEMENT                                ~5      $6, 'obj_empty'
    3    14        ASSIGN                                                   !0, ~5
   18    15        ASSIGN                                                   !1, '%25-15.15s+%257.7s%0A'
   21    16        INIT_FCALL                                               'printf'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 'Name'
         19        SEND_VAL                                                 'Empty'
         20        DO_ICALL                                                 
   22    21        ECHO                                                     '%0A'
   24    22      > FE_RESET_R                                       $11     !0, ->37
         23    > > FE_FETCH_R                                       ~12     $11, !2, ->37
         24    >   ASSIGN                                                   !3, ~12
   25    25        ISSET_ISEMPTY_CV                                         !2
         26      > JMPZ                                                     ~14, ->29
         27    >   QM_ASSIGN                                        ~15     'true'
         28      > JMP                                                      ->30
         29    >   QM_ASSIGN                                        ~15     'false'
         30    >   ASSIGN                                                   !4, ~15
   27    31        INIT_FCALL                                               'printf'
         32        SEND_VAR                                                 !1
         33        SEND_VAR                                                 !3
         34        SEND_VAR                                                 !4
         35        DO_ICALL                                                 
   24    36      > JMP                                                      ->23
         37    >   FE_FREE                                                  $11
   28    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.57 ms | 1404 KiB | 15 Q