3v4l.org

run code in 300+ PHP versions simultaneously
<?php function directly($array) { $key = 'foo'; return isset($array[$key]); } function byreference(&$array) { $key = 'foo'; return isset($array[$key]); } $array = array( 'foo' => NULL, ); echo directly($array) ? 'truthy' : 'falsey'; echo "\n"; echo byreference($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
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
Branch analysis from position: 16
filename:       /in/6er5i
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'directly'
          2        SEND_VAR                                                 !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
   18     9        ECHO                                                     '%0A'
   19    10        INIT_FCALL                                               'byreference'
         11        SEND_REF                                                 !0
         12        DO_FCALL                                      0  $4      
         13      > JMPZ                                                     $4, ->16
         14    >   QM_ASSIGN                                        ~5      'truthy'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~5      'falsey'
         17    >   ECHO                                                     ~5
         18      > RETURN                                                   1

Function directly:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6er5i
function name:  directly
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 directly

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

End of function byreference

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.6 ms | 1403 KiB | 15 Q