3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expected = range('11', '0'); $array = array_fill(0, 100, $expected); array_walk($array, 'krsort'); var_export( array_filter( $array, fn($row) => array_keys($row) !== $expected // only keep rows which are sorted incorrectly ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IIZ39
function name:  (null)
number of ops:  25
compiled vars:  !0 = $expected, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 '11'
          2        SEND_VAL                                                 '0'
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    4     5        INIT_FCALL                                               'array_fill'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 100
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
    6    11        INIT_FCALL                                               'array_walk'
         12        SEND_REF                                                 !1
         13        SEND_VAL                                                 'krsort'
         14        DO_ICALL                                                 
    8    15        INIT_FCALL                                               'var_export'
    9    16        INIT_FCALL                                               'array_filter'
   10    17        SEND_VAR                                                 !1
   11    18        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
         19        BIND_LEXICAL                                             ~7, !0
   12    20        SEND_VAL                                                 ~7
    9    21        DO_ICALL                                         $8      
   12    22        SEND_VAR                                                 $8
    8    23        DO_ICALL                                                 
   13    24      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IIZ39
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $row, !1 = $expected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        INIT_FCALL                                               'array_keys'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        IS_NOT_IDENTICAL                                 ~3      !1, $2
          6      > RETURN                                                   ~3
   12     7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.05 ms | 1017 KiB | 19 Q