3v4l.org

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

Function maybethemiddle:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
Branch analysis from position: 5
filename:       /in/rujh2
function name:  maybeTheMiddle
number of ops:  15
compiled vars:  !0 = $left, !1 = $right, !2 = $compare
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Frujh2%3A5%240'
          3        ASSIGN                                                   !2, ~3
    9     4      > JMP                                                      ->7
   10     5    >   PRE_INC                                                  !0
          6        PRE_DEC                                                  !1
    9     7    >   INIT_DYNAMIC_CALL                                        !2
          8        SEND_VAR_EX                                              !0
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $7      
         11        TYPE_CHECK                                    4          $7
         12      > JMPNZ                                                    ~8, ->5
   12    13    > > RETURN                                                   !0
   13    14*     > RETURN                                                   null

End of function maybethemiddle

Function %00%7Bclosure%7D%2Fin%2Frujh2%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rujh2
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $left, !1 = $right
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        IS_SMALLER_OR_EQUAL                              ~2      !1, !0
          3      > RETURN                                                   ~2
    7     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Frujh2%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.53 ms | 1403 KiB | 14 Q