3v4l.org

run code in 300+ PHP versions simultaneously
<?php function maybeTheMiddle($left, $right) { if ($left < $right) { return maybeTheMiddle(++$left, --$right); } return $left; } maybeTheMiddle(1, 200);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10ep7
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'maybethemiddle'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 200
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function maybethemiddle:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10ep7
function name:  maybeTheMiddle
number of ops:  13
compiled vars:  !0 = $left, !1 = $right
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        IS_SMALLER                                               !0, !1
          3      > JMPZ                                                     ~2, ->11
    6     4    >   INIT_FCALL_BY_NAME                                       'maybeTheMiddle'
          5        PRE_INC                                          ~3      !0
          6        SEND_VAL_EX                                              ~3
          7        PRE_DEC                                          ~4      !1
          8        SEND_VAL_EX                                              ~4
          9        DO_FCALL                                      0  $5      
         10      > RETURN                                                   $5
    8    11    > > RETURN                                                   !0
    9    12*     > RETURN                                                   null

End of function maybethemiddle

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.32 ms | 1397 KiB | 14 Q