3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ ['second', 'stamp' => time()], ['first', 'stamp' => time() - 10000], ['third', 'stamp' => time() + 10000], ['fourth', '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/pGqO5
function name:  (null)
number of ops:  33
compiled vars:  !0 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~1      'second'
          1        INIT_FCALL                                               'time'
          2        DO_ICALL                                         $2      
          3        ADD_ARRAY_ELEMENT                                ~1      $2, 'stamp'
          4        INIT_ARRAY                                       ~3      ~1
    5     5        INIT_ARRAY                                       ~4      'first'
          6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $5      
          8        SUB                                              ~6      $5, 10000
          9        ADD_ARRAY_ELEMENT                                ~4      ~6, 'stamp'
         10        ADD_ARRAY_ELEMENT                                ~3      ~4
    6    11        INIT_ARRAY                                       ~7      'third'
         12        INIT_FCALL                                               'time'
         13        DO_ICALL                                         $8      
         14        ADD                                              ~9      $8, 10000
         15        ADD_ARRAY_ELEMENT                                ~7      ~9, 'stamp'
         16        ADD_ARRAY_ELEMENT                                ~3      ~7
    7    17        INIT_ARRAY                                       ~10     'fourth'
         18        INIT_FCALL                                               'time'
         19        DO_ICALL                                         $11     
         20        ADD                                              ~12     $11, 5
         21        ADD_ARRAY_ELEMENT                                ~10     ~12, 'stamp'
         22        ADD_ARRAY_ELEMENT                                ~3      ~10
    3    23        ASSIGN                                                   !0, ~3
   13    24        INIT_FCALL                                               'usort'
         25        SEND_REF                                                 !0
         26        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpGqO5%3A13%240'
   15    27        SEND_VAL                                                 ~14
         28        DO_ICALL                                                 
   17    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FpGqO5%3A13%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pGqO5
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%2FpGqO5%3A13%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.22 ms | 1400 KiB | 19 Q