3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 'Adolf', 'Doe', 'adept', 'Done', 'dear', 'adopt', 'Deer' ]; $startsWith = 'do'; array_multisort( array_map(fn($v) => stripos($v, $startsWith) !== 0, $array), $array, SORT_STRING | SORT_FLAG_CASE, $array ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E7knk
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $startsWith
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   13     1        ASSIGN                                                       !1, 'do'
   15     2        INIT_FCALL                                                   'array_multisort'
   16     3        INIT_FCALL                                                   'array_map'
          4        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          5        BIND_LEXICAL                                                 ~4, !1
          6        SEND_VAL                                                     ~4
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $5      
          9        SEND_VAL                                                     $5
   17    10        SEND_REF                                                     !0
   18    11        SEND_VAL                                                     10
   19    12        SEND_REF                                                     !0
   15    13        DO_ICALL                                                     
   21    14        INIT_FCALL                                                   'var_export'
         15        SEND_VAR                                                     !0
         16        DO_ICALL                                                     
         17      > 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/E7knk
function name:  {closure:/in/E7knk:16}
number of ops:  9
compiled vars:  !0 = $v, !1 = $startsWith
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        BIND_STATIC                                                  !1
          2        INIT_FCALL                                                   'stripos'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                             $2      
          6        IS_NOT_IDENTICAL                                     ~3      $2, 0
          7      > RETURN                                                       ~3
          8*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.41 ms | 1878 KiB | 17 Q