3v4l.org

run code in 300+ PHP versions simultaneously
<?php function can($right) { $something1 = true; $something2 = true; return $something1 && $something2; } var_dump(can(123)); //---- $something1 = 1; $something2 = 2; $something4 = $something1 ? $something1 : $something2; var_dump($something4);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MTIc2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $something1, !1 = $something2, !2 = $something4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'can'
          2        SEND_VAL                                                 123
          3        DO_FCALL                                      0  $3      
          4        SEND_VAR                                                 $3
          5        DO_ICALL                                                 
   10     6        ASSIGN                                                   !0, 1
   11     7        ASSIGN                                                   !1, 2
   12     8      > JMPZ                                                     !0, ->11
          9    >   QM_ASSIGN                                        ~7      !0
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~7      !1
         12    >   ASSIGN                                                   !2, ~7
   13    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function can:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/MTIc2
function name:  can
number of ops:  7
compiled vars:  !0 = $right, !1 = $something1, !2 = $something2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <true>
    4     2        ASSIGN                                                   !2, <true>
    5     3      > JMPZ_EX                                          ~5      !1, ->5
          4    >   BOOL                                             ~5      !2
          5    > > RETURN                                                   ~5
    6     6*     > RETURN                                                   null

End of function can

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.63 ms | 1390 KiB | 16 Q