3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expected = array_flip(range('l', 'a')); $array = array_fill(0, 100, $expected); array_walk($array, 'krsort'); var_export( array_filter( $array, fn($row) => $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/sLNRK
function name:  (null)
number of ops:  28
compiled vars:  !0 = $expected, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'array_flip'
          1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 'l'
          3        SEND_VAL                                                 'a'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    4     8        INIT_FCALL                                               'array_fill'
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 100
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !1, $5
    6    14        INIT_FCALL                                               'array_walk'
         15        SEND_REF                                                 !1
         16        SEND_VAL                                                 'krsort'
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'var_export'
    9    19        INIT_FCALL                                               'array_filter'
   10    20        SEND_VAR                                                 !1
   11    21        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
         22        BIND_LEXICAL                                             ~8, !0
   12    23        SEND_VAL                                                 ~8
    9    24        DO_ICALL                                         $9      
   12    25        SEND_VAR                                                 $9
    8    26        DO_ICALL                                                 
   13    27      > 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/sLNRK
function name:  {closure}
number of ops:  5
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        IS_NOT_IDENTICAL                                 ~2      !0, !1
          3      > RETURN                                                   ~2
   12     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.37 ms | 1011 KiB | 19 Q