3v4l.org

run code in 300+ PHP versions simultaneously
<?php function &find_variable(&$one, &$two, &$three) { if($one > 10 && $one < 20) return $one; if($two > 10 && $two < 20) return $two; if($three > 10 && $three < 20) return $three; } $one = 2; $two = 20; $three = 15; $var = &find_variable($one, $two, $three); $var++; print "1: $one, 2: $two, 3: $three";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tZp4m
function name:  (null)
number of ops:  18
compiled vars:  !0 = $one, !1 = $two, !2 = $three, !3 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 2
   10     1        ASSIGN                                                   !1, 20
   11     2        ASSIGN                                                   !2, 15
   13     3        INIT_FCALL                                               'find_variable'
          4        SEND_REF                                                 !0
          5        SEND_REF                                                 !1
          6        SEND_REF                                                 !2
          7        DO_FCALL                                      0  $7      
          8        ASSIGN_REF                                               !3, $7
   15     9        PRE_INC                                                  !3
   17    10        ROPE_INIT                                     6  ~11     '1%3A+'
         11        ROPE_ADD                                      1  ~11     ~11, !0
         12        ROPE_ADD                                      2  ~11     ~11, '%2C+2%3A+'
         13        ROPE_ADD                                      3  ~11     ~11, !1
         14        ROPE_ADD                                      4  ~11     ~11, '%2C+3%3A+'
         15        ROPE_END                                      5  ~10     ~11, !2
         16        ECHO                                                     ~10
         17      > RETURN                                                   1

Function find_variable:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
Return found
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
Return found
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
Return found
Branch analysis from position: 21
Return found
Branch analysis from position: 19
Branch analysis from position: 13
Branch analysis from position: 7
filename:       /in/tZp4m
function name:  find_variable
number of ops:  22
compiled vars:  !0 = $one, !1 = $two, !2 = $three
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        IS_SMALLER                                       ~3      10, !0
          4      > JMPZ_EX                                          ~3      ~3, ->7
          5    >   IS_SMALLER                                       ~4      !0, 20
          6        BOOL                                             ~3      ~4
          7    > > JMPZ                                                     ~3, ->9
          8    > > RETURN_BY_REF                                            !0
    5     9    >   IS_SMALLER                                       ~5      10, !1
         10      > JMPZ_EX                                          ~5      ~5, ->13
         11    >   IS_SMALLER                                       ~6      !1, 20
         12        BOOL                                             ~5      ~6
         13    > > JMPZ                                                     ~5, ->15
         14    > > RETURN_BY_REF                                            !1
    6    15    >   IS_SMALLER                                       ~7      10, !2
         16      > JMPZ_EX                                          ~7      ~7, ->19
         17    >   IS_SMALLER                                       ~8      !2, 20
         18        BOOL                                             ~7      ~8
         19    > > JMPZ                                                     ~7, ->21
         20    > > RETURN_BY_REF                                            !2
    7    21    > > RETURN_BY_REF                                            null

End of function find_variable

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1403 KiB | 14 Q