3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = [ 'TRUE' => TRUE, 'FALSE' => FALSE, '1' => 1, '0' => 0, '-1' => -1, '"1"' => "1", '"0"' => "0", '"-1"' => "-1", 'NULL' => NULL, 'array()' => array(), '"php"' => "php", '""' => "", ]; foreach ($vars as $label => $var) { $result = (!$var === empty($var)) ? 'TRUE' : 'FALSE'; echo sprintf("%s: %s\n", $label, $result); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/IiJ6U
function name:  (null)
number of ops:  21
compiled vars:  !0 = $vars, !1 = $var, !2 = $label, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   16     1      > FE_RESET_R                                       $5      !0, ->19
          2    > > FE_FETCH_R                                       ~6      $5, !1, ->19
          3    >   ASSIGN                                                   !2, ~6
   17     4        BOOL_NOT                                         ~8      !1
          5        ISSET_ISEMPTY_CV                                 ~9      !1
          6        IS_IDENTICAL                                             ~8, ~9
          7      > JMPZ                                                     ~10, ->10
          8    >   QM_ASSIGN                                        ~11     'TRUE'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~11     'FALSE'
         11    >   ASSIGN                                                   !3, ~11
   18    12        INIT_FCALL                                               'sprintf'
         13        SEND_VAL                                                 '%25s%3A+%25s%0A'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $13     
         17        ECHO                                                     $13
   16    18      > JMP                                                      ->2
         19    >   FE_FREE                                                  $5
   19    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.42 ms | 1395 KiB | 15 Q