3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = false; $c = null; if ( $b = $a ) { echo '1'; } elseif ( $b = $c ) { echo '2'; } else { echo '3'; $b = 'b'; } echo $b;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
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: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pMvru
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $c, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <false>
    3     1        ASSIGN                                                   !1, null
    5     2        ASSIGN                                           ~5      !2, !0
          3      > JMPZ                                                     ~5, ->6
    6     4    >   ECHO                                                     '1'
          5      > JMP                                                      ->12
    7     6    >   ASSIGN                                           ~6      !2, !1
          7      > JMPZ                                                     ~6, ->10
    8     8    >   ECHO                                                     '2'
          9      > JMP                                                      ->12
   10    10    >   ECHO                                                     '3'
   11    11        ASSIGN                                                   !2, 'b'
   14    12    >   ECHO                                                     !2
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.77 ms | 1384 KiB | 13 Q