3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ ['stamp' => time()], ['stamp' => time() - 10000], ['stamp' => time() + 10000], ['stamp' => time() + 5], ]; usort($list, function($a, $b) { return $a['stamp'] - $b['stamp']; }); var_dump($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cdhJs
function name:  (null)
number of ops:  29
compiled vars:  !0 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $1      
          2        INIT_ARRAY                                       ~2      $1, 'stamp'
          3        INIT_ARRAY                                       ~3      ~2
    5     4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $4      
          6        SUB                                              ~5      $4, 10000
          7        INIT_ARRAY                                       ~6      ~5, 'stamp'
          8        ADD_ARRAY_ELEMENT                                ~3      ~6
    6     9        INIT_FCALL                                               'time'
         10        DO_ICALL                                         $7      
         11        ADD                                              ~8      $7, 10000
         12        INIT_ARRAY                                       ~9      ~8, 'stamp'
         13        ADD_ARRAY_ELEMENT                                ~3      ~9
    7    14        INIT_FCALL                                               'time'
         15        DO_ICALL                                         $10     
         16        ADD                                              ~11     $10, 5
         17        INIT_ARRAY                                       ~12     ~11, 'stamp'
         18        ADD_ARRAY_ELEMENT                                ~3      ~12
    3    19        ASSIGN                                                   !0, ~3
   13    20        INIT_FCALL                                               'usort'
         21        SEND_REF                                                 !0
         22        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcdhJs%3A13%240'
   15    23        SEND_VAL                                                 ~14
         24        DO_ICALL                                                 
   17    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcdhJs%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cdhJs
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        FETCH_DIM_R                                      ~2      !0, 'stamp'
          3        FETCH_DIM_R                                      ~3      !1, 'stamp'
          4        SUB                                              ~4      ~2, ~3
          5      > RETURN                                                   ~4
   15     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcdhJs%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.35 ms | 1396 KiB | 19 Q