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 = true; $a = f1() && f1(); var_dump($a); $a = true; $a = f2() && f2(); var_dump($a);
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
2 jumps found. (Code = 46) Position 1 = 26, Position 2 = 29
Branch analysis from position: 26
2 jumps found. (Code = 46) Position 1 = 37, Position 2 = 40
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
Branch analysis from position: 29
Branch analysis from position: 18
Branch analysis from position: 7
filename:       /in/Wai5c
function name:  (null)
number of ops:  45
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, <true>
   24    23        INIT_FCALL                                               'f1'
         24        DO_FCALL                                      0  $14     
         25      > JMPZ_EX                                          ~15     $14, ->29
         26    >   INIT_FCALL                                               'f1'
         27        DO_FCALL                                      0  $16     
         28        BOOL                                             ~15     $16
         29    >   ASSIGN                                                   !0, ~15
   26    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                                 
   28    33        ASSIGN                                                   !0, <true>
   29    34        INIT_FCALL                                               'f2'
         35        DO_FCALL                                      0  $20     
         36      > JMPZ_EX                                          ~21     $20, ->40
         37    >   INIT_FCALL                                               'f2'
         38        DO_FCALL                                      0  $22     
         39        BOOL                                             ~21     $22
         40    >   ASSIGN                                                   !0, ~21
   31    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !0
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wai5c
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/Wai5c
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:
161.01 ms | 1403 KiB | 23 Q