3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; } $foo = new Foo; $blanks = array("", " ", FALSE, TRUE, array(), NULL, "0", 0, 0.0, new stdClass, $foo->bar, "\0"); foreach($blanks as $blank){ var_dump($blank); $type = gettype($blank); if(count($blank) == 0){ $val = "empty"; } echo "$type($val)\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 36
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 36
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 30
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/j24Rf
function name:  (null)
number of ops:  38
compiled vars:  !0 = $foo, !1 = $blanks, !2 = $blank, !3 = $type, !4 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $5      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    6     3        INIT_ARRAY                                       ~8      ''
          4        ADD_ARRAY_ELEMENT                                ~8      '+'
          5        ADD_ARRAY_ELEMENT                                ~8      <false>
          6        ADD_ARRAY_ELEMENT                                ~8      <true>
          7        ADD_ARRAY_ELEMENT                                ~8      <array>
          8        ADD_ARRAY_ELEMENT                                ~8      null
          9        ADD_ARRAY_ELEMENT                                ~8      '0'
         10        ADD_ARRAY_ELEMENT                                ~8      0
         11        ADD_ARRAY_ELEMENT                                ~8      0
         12        NEW                                              $9      'stdClass'
         13        DO_FCALL                                      0          
         14        ADD_ARRAY_ELEMENT                                ~8      $9
         15        FETCH_OBJ_R                                      ~11     !0, 'bar'
         16        ADD_ARRAY_ELEMENT                                ~8      ~11
         17        ADD_ARRAY_ELEMENT                                ~8      '%00'
         18        ASSIGN                                                   !1, ~8
    8    19      > FE_RESET_R                                       $13     !1, ->36
         20    > > FE_FETCH_R                                               $13, !2, ->36
    9    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
   10    24        GET_TYPE                                         ~15     !2
         25        ASSIGN                                                   !3, ~15
   11    26        COUNT                                            ~17     !2
         27        IS_EQUAL                                                 ~17, 0
         28      > JMPZ                                                     ~18, ->30
         29    >   ASSIGN                                                   !4, 'empty'
   12    30    >   ROPE_INIT                                     4  ~21     !3
         31        ROPE_ADD                                      1  ~21     ~21, '%28'
         32        ROPE_ADD                                      2  ~21     ~21, !4
         33        ROPE_END                                      3  ~20     ~21, '%29%0A'
         34        ECHO                                                     ~20
    8    35      > JMP                                                      ->20
         36    >   FE_FREE                                                  $13
   13    37      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.76 ms | 1396 KiB | 15 Q