3v4l.org

run code in 300+ PHP versions simultaneously
<?php $donuts[0] = "Chocolate 02"; $donuts[1] = "Jelly 16"; $donuts[2] = "Glazed 01"; $donuts[3] = "Frosted 12"; array_multisort(array_map(fn($v) => substr($v, -2), $donuts), $donuts); var_export($donuts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOAtt
function name:  (null)
number of ops:  21
compiled vars:  !0 = $donuts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 0
          1        OP_DATA                                                  'Chocolate+02'
    4     2        ASSIGN_DIM                                               !0, 1
          3        OP_DATA                                                  'Jelly+16'
    5     4        ASSIGN_DIM                                               !0, 2
          5        OP_DATA                                                  'Glazed+01'
    6     6        ASSIGN_DIM                                               !0, 3
          7        OP_DATA                                                  'Frosted+12'
    8     8        INIT_FCALL                                               'array_multisort'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
         11        SEND_VAL                                                 ~5
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        SEND_VAL                                                 $6
         15        SEND_REF                                                 !0
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'var_export'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > 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/VOAtt
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 -2
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.4 ms | 1004 KiB | 17 Q