3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [-59.33, -58.22, -57.00, -55.34, -50.00, -45.94, -40.23, -30.44, -20.01, -10.29, -5.12, 0, 1, 3, 5, 7, 19, 20,25,26, 32, 38, 40, 45, 50, 55]; $b = -25; $c = array_map(function($value) use($b){ return abs(bcsub($value, $b, 2)); }, $a); sort($c); echo $c[0]+$b; echo "\n"; echo $c[1]+$b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WWZ0H
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, -25
    7     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWWZ0H%3A7%240'
          4        BIND_LEXICAL                                             ~5, !1
    9     5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
    7     8        ASSIGN                                                   !2, $6
   11     9        INIT_FCALL                                               'sort'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                                 
   13    12        FETCH_DIM_R                                      ~9      !2, 0
         13        ADD                                              ~10     ~9, !1
         14        ECHO                                                     ~10
   14    15        ECHO                                                     '%0A'
   15    16        FETCH_DIM_R                                      ~11     !2, 1
         17        ADD                                              ~12     ~11, !1
         18        ECHO                                                     ~12
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWWZ0H%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WWZ0H
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $value, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    8     2        INIT_FCALL                                               'abs'
          3        INIT_FCALL_BY_NAME                                       'bcsub'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              2
          7        DO_FCALL                                      0  $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10      > RETURN                                                   $3
    9    11*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWWZ0H%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.41 ms | 1396 KiB | 19 Q