3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a, $b){ if($a==10){$w="x";}else{$w="y";} if($b){$d1="none";$d2="block";}else{$d1="block";$d2="none";} echo $d2.$b; } test(1,1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3RYph
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function test:
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 = 7
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
Branch analysis from position: 11
filename:       /in/3RYph
function name:  test
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $w, !3 = $d1, !4 = $d2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        IS_EQUAL                                                 !0, 10
          3      > JMPZ                                                     ~5, ->6
          4    >   ASSIGN                                                   !2, 'x'
          5      > JMP                                                      ->7
          6    >   ASSIGN                                                   !2, 'y'
    7     7    > > JMPZ                                                     !1, ->11
          8    >   ASSIGN                                                   !3, 'none'
          9        ASSIGN                                                   !4, 'block'
         10      > JMP                                                      ->13
         11    >   ASSIGN                                                   !3, 'block'
         12        ASSIGN                                                   !4, 'none'
    9    13    >   CONCAT                                           ~12     !4, !1
         14        ECHO                                                     ~12
   11    15      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.38 ms | 1403 KiB | 14 Q