3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array(13, -12, 8, 2, 5); $final_array = array_unique(array_map('abs',$array)); // remove duplicates and apply abs() to all elements rsort($final_array,SORT_NUMERIC); //reverse sort array numerically echo $final_array[1]; //get second highest
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mgjaO
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array, !1 = $final_array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'array_unique'
          2        INIT_FCALL                                                   'array_map'
          3        SEND_VAL                                                     'abs'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $3      
          6        SEND_VAR                                                     $3
          7        DO_ICALL                                             $4      
          8        ASSIGN                                                       !1, $4
    5     9        INIT_FCALL                                                   'rsort'
         10        SEND_REF                                                     !1
         11        SEND_VAL                                                     1
         12        DO_ICALL                                                     
    7    13        FETCH_DIM_R                                          ~7      !1, 1
         14        ECHO                                                         ~7
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
152.61 ms | 2047 KiB | 16 Q