3v4l.org

run code in 500+ PHP versions simultaneously
<?php $vars = array( true, false, null, 'string', array(), array(1),array(1, 2, 3), new stdClass() ); foreach ($vars as $var) { echo "------------\r"; var_export($var); echo "\r"; echo "!empty() = "; var_dump(!empty($var)); echo "count() = "; var_dump(count($var)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 30
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 30
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/1mkY5
function name:  (null)
number of ops:  32
compiled vars:  !0 = $vars, !1 = $var
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                           ~2      <true>
          1        ADD_ARRAY_ELEMENT                                    ~2      <false>
          2        ADD_ARRAY_ELEMENT                                    ~2      null
          3        ADD_ARRAY_ELEMENT                                    ~2      'string'
          4        ADD_ARRAY_ELEMENT                                    ~2      <array>
          5        ADD_ARRAY_ELEMENT                                    ~2      <array>
          6        ADD_ARRAY_ELEMENT                                    ~2      <array>
          7        NEW                                                  $3      'stdClass'
          8        DO_FCALL                                          0          
          9        ADD_ARRAY_ELEMENT                                    ~2      $3
    3    10        ASSIGN                                                       !0, ~2
    7    11      > FE_RESET_R                                           $6      !0, ->30
         12    > > FE_FETCH_R                                                   $6, !1, ->30
    8    13    >   ECHO                                                         '------------%0D'
    9    14        INIT_FCALL                                                   'var_export'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
   10    17        ECHO                                                         '%0D'
   11    18        ECHO                                                         '%21empty%28%29+%3D+'
   12    19        INIT_FCALL                                                   'var_dump'
         20        ISSET_ISEMPTY_CV                                     ~8      !1
         21        BOOL_NOT                                             ~9      ~8
         22        SEND_VAL                                                     ~9
         23        DO_ICALL                                                     
   13    24        ECHO                                                         'count%28%29+%3D++'
   14    25        INIT_FCALL                                                   'var_dump'
         26        COUNT                                                ~11     !1
         27        SEND_VAL                                                     ~11
         28        DO_ICALL                                                     
    7    29      > JMP                                                          ->12
         30    >   FE_FREE                                                      $6
   15    31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
133.45 ms | 2247 KiB | 15 Q