3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj { } function ret_true() { return true; } function ret_false() { return false; } function ret_obj() { return new obj(); } function ret_std() { return new stdClass(); } if ($a = ret_true() == true) { var_dump('true:true'); } if ($a = ret_true() == false) { var_dump('true:false'); } if ($a = ret_false() == true) { var_dump('false:true'); } if ($a = ret_false() == false) { var_dump('false:false'); } if (get_class($a = ret_obj()) === 'obj') { var_dump('obj:obj'); } if ($a = ret_obj() instanceof stdClass) { var_dump('obj:std'); } if ($a = ret_std() instanceof obj) { var_dump('std:obj'); } if ($a = ret_std() instanceof stdClass) { var_dump('std:std'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 41
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 49
Branch analysis from position: 46
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 57
Branch analysis from position: 54
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 65
Branch analysis from position: 62
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 65
Branch analysis from position: 57
Branch analysis from position: 49
Branch analysis from position: 41
Branch analysis from position: 32
Branch analysis from position: 24
Branch analysis from position: 16
Branch analysis from position: 8
filename:       /in/bgcpA
function name:  (null)
number of ops:  66
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'ret_true'
          1        DO_FCALL                                      0  $1      
          2        BOOL                                             ~2      $1
          3        ASSIGN                                           ~3      !0, ~2
          4      > JMPZ                                                     ~3, ->8
   20     5    >   INIT_FCALL                                               'var_dump'
          6        SEND_VAL                                                 'true%3Atrue'
          7        DO_ICALL                                                 
   22     8    >   INIT_FCALL                                               'ret_true'
          9        DO_FCALL                                      0  $5      
         10        BOOL_NOT                                         ~6      $5
         11        ASSIGN                                           ~7      !0, ~6
         12      > JMPZ                                                     ~7, ->16
   23    13    >   INIT_FCALL                                               'var_dump'
         14        SEND_VAL                                                 'true%3Afalse'
         15        DO_ICALL                                                 
   26    16    >   INIT_FCALL                                               'ret_false'
         17        DO_FCALL                                      0  $9      
         18        BOOL                                             ~10     $9
         19        ASSIGN                                           ~11     !0, ~10
         20      > JMPZ                                                     ~11, ->24
   27    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAL                                                 'false%3Atrue'
         23        DO_ICALL                                                 
   29    24    >   INIT_FCALL                                               'ret_false'
         25        DO_FCALL                                      0  $13     
         26        BOOL_NOT                                         ~14     $13
         27        ASSIGN                                           ~15     !0, ~14
         28      > JMPZ                                                     ~15, ->32
   30    29    >   INIT_FCALL                                               'var_dump'
         30        SEND_VAL                                                 'false%3Afalse'
         31        DO_ICALL                                                 
   34    32    >   INIT_FCALL                                               'ret_obj'
         33        DO_FCALL                                      0  $17     
         34        ASSIGN                                           ~18     !0, $17
         35        GET_CLASS                                        ~19     ~18
         36        IS_IDENTICAL                                             ~19, 'obj'
         37      > JMPZ                                                     ~20, ->41
   35    38    >   INIT_FCALL                                               'var_dump'
         39        SEND_VAL                                                 'obj%3Aobj'
         40        DO_ICALL                                                 
   37    41    >   INIT_FCALL                                               'ret_obj'
         42        DO_FCALL                                      0  $22     
         43        INSTANCEOF                                       ~23     $22, 'stdClass'
         44        ASSIGN                                           ~24     !0, ~23
         45      > JMPZ                                                     ~24, ->49
   38    46    >   INIT_FCALL                                               'var_dump'
         47        SEND_VAL                                                 'obj%3Astd'
         48        DO_ICALL                                                 
   40    49    >   INIT_FCALL                                               'ret_std'
         50        DO_FCALL                                      0  $26     
         51        INSTANCEOF                                       ~27     $26, 'obj'
         52        ASSIGN                                           ~28     !0, ~27
         53      > JMPZ                                                     ~28, ->57
   41    54    >   INIT_FCALL                                               'var_dump'
         55        SEND_VAL                                                 'std%3Aobj'
         56        DO_ICALL                                                 
   43    57    >   INIT_FCALL                                               'ret_std'
         58        DO_FCALL                                      0  $30     
         59        INSTANCEOF                                       ~31     $30, 'stdClass'
         60        ASSIGN                                           ~32     !0, ~31
         61      > JMPZ                                                     ~32, ->65
   44    62    >   INIT_FCALL                                               'var_dump'
         63        SEND_VAL                                                 'std%3Astd'
         64        DO_ICALL                                                 
   45    65    > > RETURN                                                   1

Function ret_true:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgcpA
function name:  ret_true
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   <true>
    8     1*     > RETURN                                                   null

End of function ret_true

Function ret_false:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgcpA
function name:  ret_false
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   <false>
   11     1*     > RETURN                                                   null

End of function ret_false

Function ret_obj:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgcpA
function name:  ret_obj
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'obj'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   14     3*     > RETURN                                                   null

End of function ret_obj

Function ret_std:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bgcpA
function name:  ret_std
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $0      'stdClass'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   17     3*     > RETURN                                                   null

End of function ret_std

Class obj: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.16 ms | 1398 KiB | 23 Q