3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FalseObject { public function __toString() { // return an empty string that in PHP evaluates to false return ''; } } $false = new FalseObject(); if ( $false ) { print $false . ' is false.'; } else { print $false . ' is true.'; } print '<br />'; if ( !$false ) { print $false . ' is really true.'; } else { print $false . ' is really false.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
Branch analysis from position: 16
filename:       /in/WAEbP
function name:  (null)
number of ops:  19
compiled vars:  !0 = $false
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'falseobject'
    9     1        NEW                                              $1      'FalseObject'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   11     4      > JMPZ                                                     !0, ->8
   12     5    >   CONCAT                                           ~4      !0, '+is+false.'
          6        ECHO                                                     ~4
          7      > JMP                                                      ->10
   14     8    >   CONCAT                                           ~5      !0, '+is+true.'
          9        ECHO                                                     ~5
   17    10    >   ECHO                                                     '%3Cbr+%2F%3E'
   19    11        BOOL_NOT                                         ~6      !0
         12      > JMPZ                                                     ~6, ->16
   20    13    >   CONCAT                                           ~7      !0, '+is+really+true.'
         14        ECHO                                                     ~7
         15      > JMP                                                      ->18
   22    16    >   CONCAT                                           ~8      !0, '+is+really+false.'
         17        ECHO                                                     ~8
   23    18    > > RETURN                                                   1

Class FalseObject:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WAEbP
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   ''
    6     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class FalseObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.28 ms | 1395 KiB | 13 Q