3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = ''; $testone = 0; $testtwo = 0.0; $testthree = array(); $testfour = fopen("http://ya.ru", "r"); if(empty($foo)) echo "Foo is empty - ". gettype($foo); // Foo is empty - string if(empty($bar)) echo 'Bar is empty too - '. gettype($bar); // Notice: Undefined variable: bar in /in/kCIj8 on line 7 Bar is empty too - NULL if(empty($testone)) echo 'Testone is empty - '.gettype($testone); if(empty($testtwo)) echo 'Testtwo is empty - '.gettype($testtwo); if(empty($testthree)) echo 'Testthree is empty - '.gettype($testthree); if(empty($testfour)) echo 'Testtwo is empty'.gettype($testthree); else echo "Testfour's not empty -".var_dump($testfour); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 40
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
Branch analysis from position: 29
Branch analysis from position: 24
Branch analysis from position: 19
Branch analysis from position: 14
filename:       /in/EVh57
function name:  (null)
number of ops:  46
compiled vars:  !0 = $foo, !1 = $testone, !2 = $testtwo, !3 = $testthree, !4 = $testfour, !5 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, 0
    5     2        ASSIGN                                                   !2, 0
    6     3        ASSIGN                                                   !3, <array>
    7     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'http%3A%2F%2Fya.ru'
          6        SEND_VAL                                                 'r'
          7        DO_ICALL                                         $10     
          8        ASSIGN                                                   !4, $10
    8     9        ISSET_ISEMPTY_CV                                         !0
         10      > JMPZ                                                     ~12, ->14
    9    11    >   GET_TYPE                                         ~13     !0
         12        CONCAT                                           ~14     'Foo+is+empty+-+', ~13
         13        ECHO                                                     ~14
   10    14    >   ISSET_ISEMPTY_CV                                         !5
         15      > JMPZ                                                     ~15, ->19
   11    16    >   GET_TYPE                                         ~16     !5
         17        CONCAT                                           ~17     'Bar+is+empty+too+-+', ~16
         18        ECHO                                                     ~17
   12    19    >   ISSET_ISEMPTY_CV                                         !1
         20      > JMPZ                                                     ~18, ->24
   13    21    >   GET_TYPE                                         ~19     !1
         22        CONCAT                                           ~20     'Testone+is+empty+-+', ~19
         23        ECHO                                                     ~20
   14    24    >   ISSET_ISEMPTY_CV                                         !2
         25      > JMPZ                                                     ~21, ->29
   15    26    >   GET_TYPE                                         ~22     !2
         27        CONCAT                                           ~23     'Testtwo+is+empty+-+', ~22
         28        ECHO                                                     ~23
   16    29    >   ISSET_ISEMPTY_CV                                         !3
         30      > JMPZ                                                     ~24, ->34
   17    31    >   GET_TYPE                                         ~25     !3
         32        CONCAT                                           ~26     'Testthree+is+empty+-+', ~25
         33        ECHO                                                     ~26
   18    34    >   ISSET_ISEMPTY_CV                                         !4
         35      > JMPZ                                                     ~27, ->40
   19    36    >   GET_TYPE                                         ~28     !3
         37        CONCAT                                           ~29     'Testtwo+is+empty', ~28
         38        ECHO                                                     ~29
         39      > JMP                                                      ->45
   21    40    >   INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !4
         42        DO_ICALL                                         $30     
         43        CONCAT                                           ~31     'Testfour%27s+not+empty+-', $30
         44        ECHO                                                     ~31
   22    45    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.88 ms | 1400 KiB | 17 Q