3v4l.org

run code in 300+ PHP versions simultaneously
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/AC34K
function name:  (null)
number of ops:  16
compiled vars:  !0 = $haystack, !1 = $needles, !2 = $needle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   25     2      > FE_RESET_R                                       $5      !1, ->14
          3    > > FE_FETCH_R                                               $5, !2, ->14
   26     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~6      !2, '+-%3E+'
          6        INIT_FCALL                                               'getnearest'
          7        SEND_VAR                                                 !2
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0  $7      
         10        CONCAT                                           ~8      ~6, $7
         11        CONCAT                                           ~9      ~8, '%0A'
         12        ECHO                                                     ~9
   25    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $5
   27    15      > RETURN                                                   1

Function getnearest:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 25
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 24
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/AC34K
function name:  getNearest
number of ops:  30
compiled vars:  !0 = $needle, !1 = $haystack, !2 = $bestDistance, !3 = $value, !4 = $distance, !5 = $keep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        BOOL_NOT                                         ~6      !1
          3      > JMPZ                                                     ~6, ->8
    9     4    >   NEW                                              $7      'Exception'
          5        SEND_VAL_EX                                              'empty+haystack'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $7
   11     8    >   ASSIGN                                                   !2, 9223372036854775807
   12     9      > FE_RESET_R                                       $10     !1, ->25
         10    > > FE_FETCH_R                                               $10, !3, ->25
   13    11    >   IS_IDENTICAL                                             !3, !0
         12      > JMPZ                                                     ~11, ->15
   14    13    >   FE_FREE                                                  $10
         14      > RETURN                                                   !0
   16    15    >   INIT_FCALL                                               'abs'
         16        SUB                                              ~12     !3, !0
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !4, $13
   17    20        IS_SMALLER                                               !4, !2
         21      > JMPZ                                                     ~15, ->24
   18    22    >   ASSIGN                                                   !2, !4
   19    23        ASSIGN                                                   !5, !3
   12    24    > > JMP                                                      ->10
         25    >   FE_FREE                                                  $10
   22    26        COALESCE                                         ~18     !5
         27        QM_ASSIGN                                        ~18     !3
         28      > RETURN                                                   ~18
   23    29*     > RETURN                                                   null

End of function getnearest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.65 ms | 974 KiB | 15 Q