3v4l.org

run code in 300+ PHP versions simultaneously
<?php $files = [ 0 => 'scpt-01-2010.phtml', 1 => 'scpt-01-2011.phtml', 2 => 'scpt-02-2010.phtml', 3 => 'scpt-02-2011.phtml', 4 => 'scpt-03-2010.phtml', 5 => 'scpt-04-2010.phtml', 6 => 'scpt-05-2010.phtml', 7 => 'scpt-06-2010.phtml', 8 => 'scpt-07-2010.phtml', 9 => 'scpt-08-2010.phtml', 10 => 'scpt-09-2010.phtml', 11 => 'scpt-10-2010.phtml', 12 => 'scpt-11-2010.phtml', 13 => 'scpt-12-2010.phtml', ]; usort($files, function ($a, $b) { return array_reverse(explode('-', $b, 3)) <=> array_reverse(explode('-', $a, 3)); }); var_export($files);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0OJm9
function name:  (null)
number of ops:  10
compiled vars:  !0 = $files
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   22     4        SEND_VAL                                                 ~2
   20     5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'var_export'
          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/0OJm9
function name:  {closure}
number of ops:  21
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   21     2        INIT_FCALL                                               'array_reverse'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '-'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 3
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        INIT_FCALL                                               'array_reverse'
         11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '-'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 3
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                         $5      
         18        SPACESHIP                                        ~6      $3, $5
         19      > RETURN                                                   ~6
   22    20*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.83 ms | 1004 KiB | 17 Q