3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array ( array( "a"=> 'a', ), array( "b"=> 'b', ), ); var_dump($test); var_dump(usort($test, function(array $a, array $b) { if (array_values($a) < array_values($b)) { return 1; // reverse } else if (array_values($a) > array_values($b)) { return -1; // reverse } else { return 0; } })); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZXON
function name:  (null)
number of ops:  16
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   13     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'usort'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHZXON%3A13%240'
   21     8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   22    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FHZXON%3A13%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZXON
function name:  {closure}
number of ops:  24
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        INIT_FCALL                                               'array_values'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        INIT_FCALL                                               'array_values'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $3      
          8        IS_SMALLER                                               $2, $3
          9      > JMPZ                                                     ~4, ->12
   15    10    > > RETURN                                                   1
         11*       JMP                                                      ->23
   16    12    >   INIT_FCALL                                               'array_values'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        INIT_FCALL                                               'array_values'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $6      
         18        IS_SMALLER                                               $6, $5
         19      > JMPZ                                                     ~7, ->22
   17    20    > > RETURN                                                   -1
         21*       JMP                                                      ->23
   19    22    > > RETURN                                                   0
   21    23*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.21 ms | 1405 KiB | 19 Q