3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1,10); array_shuffle($range); print_r( uasort($range, function($a, $b) { return $a-$b; }) ); print_r( uasort($range, function($a, $b) { return $b-$a; }) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQR9I
function name:  (null)
number of ops:  25
compiled vars:  !0 = $range
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    4     5        INIT_FCALL_BY_NAME                                       'array_shuffle'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
    6     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'uasort'
         10        SEND_REF                                                 !0
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtQR9I%3A6%240'
         12        SEND_VAL                                                 ~4
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'uasort'
         18        SEND_REF                                                 !0
         19        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtQR9I%3A7%241'
         20        SEND_VAL                                                 ~7
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtQR9I%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQR9I
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        SUB                                              ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtQR9I%3A6%240

Function %00%7Bclosure%7D%2Fin%2FtQR9I%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQR9I
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        SUB                                              ~2      !1, !0
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtQR9I%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1400 KiB | 19 Q