3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clans = array('1:50', '2:50', '3:33', '4:100'); usort($clans, function($a, $b) { list($nameA, $scoreA) = explode(':', $a); list($nameB, $scoreB) = explode(':', $b); if ($scoreA == $scoreB) { return 0; } else { return $scoreA < $scoreB ? -1 : 1; } }); var_dump($clans);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hVQrc
function name:  (null)
number of ops:  10
compiled vars:  !0 = $clans
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhVQrc%3A5%240'
   13     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FhVQrc%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hVQrc
function name:  {closure}
number of ops:  31
compiled vars:  !0 = $a, !1 = $b, !2 = $nameA, !3 = $scoreA, !4 = $nameB, !5 = $scoreB
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                                                 '%3A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        FETCH_LIST_R                                     $7      $6, 0
          7        ASSIGN                                                   !2, $7
          8        FETCH_LIST_R                                     $9      $6, 1
          9        ASSIGN                                                   !3, $9
         10        FREE                                                     $6
    7    11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '%3A'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $11     
         15        FETCH_LIST_R                                     $12     $11, 0
         16        ASSIGN                                                   !4, $12
         17        FETCH_LIST_R                                     $14     $11, 1
         18        ASSIGN                                                   !5, $14
         19        FREE                                                     $11
    8    20        IS_EQUAL                                                 !3, !5
         21      > JMPZ                                                     ~16, ->24
    9    22    > > RETURN                                                   0
         23*       JMP                                                      ->30
   11    24    >   IS_SMALLER                                               !3, !5
         25      > JMPZ                                                     ~17, ->28
         26    >   QM_ASSIGN                                        ~18     -1
         27      > JMP                                                      ->29
         28    >   QM_ASSIGN                                        ~18     1
         29    > > RETURN                                                   ~18
   13    30*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.16 ms | 1400 KiB | 19 Q