3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f1() { echo 1; return true; } function f2() { echo 2; return false; } $a = true; $a = f1() && f2(); var_dump($a); $a = true; $a = f2() && f1(); var_dump($a); $a = false; $a &= f2();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 7
filename:       /in/5QdMc
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <true>
   14     1        INIT_FCALL                                               'f1'
          2        DO_FCALL                                      0  $2      
          3      > JMPZ_EX                                          ~3      $2, ->7
          4    >   INIT_FCALL                                               'f2'
          5        DO_FCALL                                      0  $4      
          6        BOOL                                             ~3      $4
          7    >   ASSIGN                                                   !0, ~3
   16     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   18    11        ASSIGN                                                   !0, <true>
   19    12        INIT_FCALL                                               'f2'
         13        DO_FCALL                                      0  $8      
         14      > JMPZ_EX                                          ~9      $8, ->18
         15    >   INIT_FCALL                                               'f1'
         16        DO_FCALL                                      0  $10     
         17        BOOL                                             ~9      $10
         18    >   ASSIGN                                                   !0, ~9
   21    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
   23    22        ASSIGN                                                   !0, <false>
   24    23        INIT_FCALL                                               'f2'
         24        DO_FCALL                                      0  $14     
         25        ASSIGN_OP                                    10          !0, $14
         26      > RETURN                                                   1

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

End of function f1

Function f2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5QdMc
function name:  f2
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     2
   10     1      > RETURN                                                   <false>
   11     2*     > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.59 ms | 1403 KiB | 20 Q