3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = (object) ['a'=> 1]; if ($x) { echo "if\n"; } function takes_bool(bool $param) {} takes_bool($x);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) 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/fCQFL
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    5     2      > JMPZ                                                     !0, ->4
    6     3    >   ECHO                                                     'if%0A'
   11     4    >   INIT_FCALL                                               'takes_bool'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function takes_bool:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fCQFL
function name:  takes_bool
number of ops:  2
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function takes_bool

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.14 ms | 1396 KiB | 14 Q