3v4l.org

run code in 500+ PHP versions simultaneously
<?php $list = [ ['a' => 1, 'priority' => false], ['a' => 2, 'priority' => true], ['a' => 3, 'priority' => false], ['a' => 4, 'priority' => true], ]; usort ($list, static fn (array $a, array $b): int => (int)$b['priority'] <=> (int)$a['priority']); var_dump($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cuvkl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $list
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   11     1        INIT_FCALL                                                   'usort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                                     
   13     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
          9      > 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/Cuvkl
function name:  {closure:/in/Cuvkl:11}
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        FETCH_DIM_R                                          ~2      !1, 'priority'
          3        CAST                                              4  ~3      ~2
          4        FETCH_DIM_R                                          ~4      !0, 'priority'
          5        CAST                                              4  ~5      ~4
          6        SPACESHIP                                            ~6      ~3, ~5
          7        VERIFY_RETURN_TYPE                                           ~6
          8      > RETURN                                                       ~6
          9*       VERIFY_RETURN_TYPE                                           
         10*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.9 ms | 1824 KiB | 15 Q