3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('php__01.png','php__02.png','php__03.png','php_2_01.png','php_2_02.png','php_10_01.png','php_10_02.png','php_9_02.png','php_9_01.png','php_9_03.png'); $cb = function($valueA, $valueB) { $vA = explode('_', $valueA); $vB = explode('_', $valueB); $element = 0; do { $x = $vA[$element] - $vB[$element++]; } while ($x <> 0); return $x; }; usort($arr, $cb); var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9mGq0
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $cb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9mGq0%3A5%240'
          2        ASSIGN                                                   !1, ~3
   15     3        INIT_FCALL                                               'usort'
          4        SEND_REF                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   17     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9mGq0%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/9mGq0
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $valueA, !1 = $valueB, !2 = $vA, !3 = $vB, !4 = $element, !5 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '_'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '_'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
    8    12        ASSIGN                                                   !4, 0
   10    13    >   FETCH_DIM_R                                      ~11     !2, !4
         14        POST_INC                                         ~12     !4
         15        FETCH_DIM_R                                      ~13     !3, ~12
         16        SUB                                              ~14     ~11, ~13
         17        ASSIGN                                                   !5, ~14
   11    18        IS_NOT_EQUAL                                             !5, 0
         19      > JMPNZ                                                    ~16, ->13
   12    20    > > RETURN                                                   !5
   13    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9mGq0%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
202.13 ms | 1396 KiB | 19 Q