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; } } $false = new FalseObject(); if ( (bool)$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 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
Branch analysis from position: 17
filename:       /in/4drVm
function name:  (null)
number of ops:  20
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        BOOL                                             ~4      !0
          5      > JMPZ                                                     ~4, ->9
   12     6    >   CONCAT                                           ~5      !0, '+is+false.'
          7        ECHO                                                     ~5
          8      > JMP                                                      ->11
   14     9    >   CONCAT                                           ~6      !0, '+is+true.'
         10        ECHO                                                     ~6
   17    11    >   ECHO                                                     '%3Cbr+%2F%3E'
   19    12        BOOL_NOT                                         ~7      !0
         13      > JMPZ                                                     ~7, ->17
   20    14    >   CONCAT                                           ~8      !0, '+is+really+true.'
         15        ECHO                                                     ~8
         16      > JMP                                                      ->19
   22    17    >   CONCAT                                           ~9      !0, '+is+really+false.'
         18        ECHO                                                     ~9
   23    19    > > RETURN                                                   1

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

End of function __tostring

End of class FalseObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.32 ms | 1395 KiB | 13 Q