3v4l.org

run code in 300+ PHP versions simultaneously
<?php function testBooleanOperators($flag, $exp) { return $flag || $exp; } var_dump(testBooleanOperators(true, 'abc')); var_dump(testBooleanOperators('I am truthy!', 'abc')); var_dump(testBooleanOperators(false, 'abc')); var_dump(testBooleanOperators(false, null));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/STjfO
function name:  (null)
number of ops:  29
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'testbooleanoperators'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 'abc'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
    9     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'testbooleanoperators'
          9        SEND_VAL                                                 'I+am+truthy%21'
         10        SEND_VAL                                                 'abc'
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'testbooleanoperators'
         16        SEND_VAL                                                 <false>
         17        SEND_VAL                                                 'abc'
         18        DO_FCALL                                      0  $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'testbooleanoperators'
         23        SEND_VAL                                                 <false>
         24        SEND_VAL                                                 null
         25        DO_FCALL                                      0  $6      
         26        SEND_VAR                                                 $6
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Function testbooleanoperators:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/STjfO
function name:  testBooleanOperators
number of ops:  6
compiled vars:  !0 = $flag, !1 = $exp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2      > JMPNZ_EX                                         ~2      !0, ->4
          3    >   BOOL                                             ~2      !1
          4    > > RETURN                                                   ~2
    6     5*     > RETURN                                                   null

End of function testbooleanoperators

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.73 ms | 1399 KiB | 19 Q