3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(&$array) { $key = 'foo'; return isset($array[$key]); } $array = array( 'foo' => NULL, ); echo test($array) ? 'truthy' : 'falsey';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tog5q
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'test'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->7
          5    >   QM_ASSIGN                                        ~3      'truthy'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~3      'falsey'
          8    >   ECHO                                                     ~3
          9      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tog5q
function name:  test
number of ops:  5
compiled vars:  !0 = $array, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 'foo'
    5     2        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !0, !1
          3      > RETURN                                                   ~3
    6     4*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.39 ms | 1397 KiB | 14 Q