3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func($t) { if($t==1) return array('some'=>'array'); return 0; } if(!$r = func(0) ) { echo "Not an array"; } else { echo "It's an array"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kD34k
function name:  (null)
number of ops:  10
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'func'
          1        SEND_VAL                                                 0
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                           ~2      !0, $1
          4        BOOL_NOT                                         ~3      ~2
          5      > JMPZ                                                     ~3, ->8
   10     6    >   ECHO                                                     'Not+an+array'
          7      > JMP                                                      ->9
   12     8    >   ECHO                                                     'It%27s+an+array'
   14     9    > > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kD34k
function name:  func
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~1, ->4
    4     3    > > RETURN                                                   <array>
    6     4    > > RETURN                                                   0
    7     5*     > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.58 ms | 1397 KiB | 14 Q