3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,2,3]; var_dump( asort($array) ); var_dump( ksort($array) ); var_dump( natcasesort($array) ); var_dump( natsort($array) ); var_dump( uasort($array, function() { return 0; } ) ); var_dump( uksort($array, function() { return 0; } ) ); $notArray = 'Hello, World'; var_dump( asort($notAarray) ); $notArray = 'Hello, World'; var_dump( ksort($notAarray) ); $notArray = 'Hello, World'; var_dump( natcasesort($notAarray) ); $notArray = 'Hello, World'; var_dump( natsort($notAarray) ); $notArray = 'Hello, World'; var_dump( uasort($notAarray, function() { return 0; } ) ); $notArray = 'Hello, World'; var_dump( uksort($notAarray, function() { return 0; } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AXUbm
function name:  (null)
number of ops:  88
compiled vars:  !0 = $array, !1 = $notArray, !2 = $notAarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'asort'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'ksort'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'natcasesort'
         15        SEND_REF                                                 !0
         16        DO_ICALL                                         $8      
         17        SEND_VAR                                                 $8
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'natsort'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                         $10     
         23        SEND_VAR                                                 $10
         24        DO_ICALL                                                 
    9    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'uasort'
         27        SEND_REF                                                 !0
         28        DECLARE_LAMBDA_FUNCTION                          ~12     [0]
         29        SEND_VAL                                                 ~12
         30        DO_ICALL                                         $13     
         31        SEND_VAR                                                 $13
         32        DO_ICALL                                                 
   10    33        INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'uksort'
         35        SEND_REF                                                 !0
         36        DECLARE_LAMBDA_FUNCTION                          ~15     [1]
         37        SEND_VAL                                                 ~15
         38        DO_ICALL                                         $16     
         39        SEND_VAR                                                 $16
         40        DO_ICALL                                                 
   12    41        ASSIGN                                                   !1, 'Hello%2C+World'
   13    42        INIT_FCALL                                               'var_dump'
         43        INIT_FCALL                                               'asort'
         44        SEND_REF                                                 !2
         45        DO_ICALL                                         $19     
         46        SEND_VAR                                                 $19
         47        DO_ICALL                                                 
   15    48        ASSIGN                                                   !1, 'Hello%2C+World'
   16    49        INIT_FCALL                                               'var_dump'
         50        INIT_FCALL                                               'ksort'
         51        SEND_REF                                                 !2
         52        DO_ICALL                                         $22     
         53        SEND_VAR                                                 $22
         54        DO_ICALL                                                 
   18    55        ASSIGN                                                   !1, 'Hello%2C+World'
   19    56        INIT_FCALL                                               'var_dump'
         57        INIT_FCALL                                               'natcasesort'
         58        SEND_REF                                                 !2
         59        DO_ICALL                                         $25     
         60        SEND_VAR                                                 $25
         61        DO_ICALL                                                 
   21    62        ASSIGN                                                   !1, 'Hello%2C+World'
   22    63        INIT_FCALL                                               'var_dump'
         64        INIT_FCALL                                               'natsort'
         65        SEND_REF                                                 !2
         66        DO_ICALL                                         $28     
         67        SEND_VAR                                                 $28
         68        DO_ICALL                                                 
   24    69        ASSIGN                                                   !1, 'Hello%2C+World'
   25    70        INIT_FCALL                                               'var_dump'
         71        INIT_FCALL                                               'uasort'
         72        SEND_REF                                                 !2
         73        DECLARE_LAMBDA_FUNCTION                          ~31     [2]
         74        SEND_VAL                                                 ~31
         75        DO_ICALL                                         $32     
         76        SEND_VAR                                                 $32
         77        DO_ICALL                                                 
   27    78        ASSIGN                                                   !1, 'Hello%2C+World'
   28    79        INIT_FCALL                                               'var_dump'
         80        INIT_FCALL                                               'uksort'
         81        SEND_REF                                                 !2
         82        DECLARE_LAMBDA_FUNCTION                          ~35     [3]
         83        SEND_VAL                                                 ~35
         84        DO_ICALL                                         $36     
         85        SEND_VAR                                                 $36
         86        DO_ICALL                                                 
         87      > 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/AXUbm
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   0
          1*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AXUbm
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   0
          1*     > RETURN                                                   null

End of Dynamic Function 1

Dynamic Function 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AXUbm
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E > > RETURN                                                   0
          1*     > RETURN                                                   null

End of Dynamic Function 2

Dynamic Function 3
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AXUbm
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E > > RETURN                                                   0
          1*     > RETURN                                                   null

End of Dynamic Function 3

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.74 ms | 1020 KiB | 20 Q