3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ArrayIterator = new ArrayIterator([1,2,3]); var_dump( $ArrayIterator->asort() ); var_dump( $ArrayIterator->ksort() ); var_dump( $ArrayIterator->natcasesort() ); var_dump( $ArrayIterator->natsort() ); var_dump( $ArrayIterator->uasort( function() { return 0; } ) ); var_dump( $ArrayIterator->uksort( function() { return 0; } ) ); $ArrayObject = new ArrayObject([1,2,3]); var_dump( $ArrayObject->asort() ); var_dump( $ArrayObject->ksort() ); var_dump( $ArrayObject->natcasesort() ); var_dump( $ArrayObject->natsort() ); var_dump( $ArrayObject->uasort( function() { return 0; } ) ); var_dump( $ArrayObject->uksort( function() { return 0; } ) ); $RecursiveArrayIterator = new RecursiveArrayIterator([1,2,3]); var_dump( $RecursiveArrayIterator->asort() ); var_dump( $RecursiveArrayIterator->ksort() ); var_dump( $RecursiveArrayIterator->natcasesort() ); var_dump( $RecursiveArrayIterator->natsort() ); var_dump( $RecursiveArrayIterator->uasort( function() { return 0; } ) ); var_dump( $RecursiveArrayIterator->uksort( function() { return 0; } ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dfQkV
function name:  (null)
number of ops:  115
compiled vars:  !0 = $ArrayIterator, !1 = $ArrayObject, !2 = $RecursiveArrayIterator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'asort'
          6        DO_FCALL                                      0  $6      
          7        SEND_VAR                                                 $6
          8        DO_ICALL                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'ksort'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
    7    14        INIT_FCALL                                               'var_dump'
         15        INIT_METHOD_CALL                                         !0, 'natcasesort'
         16        DO_FCALL                                      0  $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_METHOD_CALL                                         !0, 'natsort'
         21        DO_FCALL                                      0  $12     
         22        SEND_VAR                                                 $12
         23        DO_ICALL                                                 
    9    24        INIT_FCALL                                               'var_dump'
         25        INIT_METHOD_CALL                                         !0, 'uasort'
         26        DECLARE_LAMBDA_FUNCTION                          ~14     [0]
         27        SEND_VAL_EX                                              ~14
         28        DO_FCALL                                      0  $15     
         29        SEND_VAR                                                 $15
         30        DO_ICALL                                                 
   10    31        INIT_FCALL                                               'var_dump'
         32        INIT_METHOD_CALL                                         !0, 'uksort'
         33        DECLARE_LAMBDA_FUNCTION                          ~17     [1]
         34        SEND_VAL_EX                                              ~17
         35        DO_FCALL                                      0  $18     
         36        SEND_VAR                                                 $18
         37        DO_ICALL                                                 
   12    38        NEW                                              $20     'ArrayObject'
         39        SEND_VAL_EX                                              <array>
         40        DO_FCALL                                      0          
         41        ASSIGN                                                   !1, $20
   14    42        INIT_FCALL                                               'var_dump'
         43        INIT_METHOD_CALL                                         !1, 'asort'
         44        DO_FCALL                                      0  $23     
         45        SEND_VAR                                                 $23
         46        DO_ICALL                                                 
   15    47        INIT_FCALL                                               'var_dump'
         48        INIT_METHOD_CALL                                         !1, 'ksort'
         49        DO_FCALL                                      0  $25     
         50        SEND_VAR                                                 $25
         51        DO_ICALL                                                 
   16    52        INIT_FCALL                                               'var_dump'
         53        INIT_METHOD_CALL                                         !1, 'natcasesort'
         54        DO_FCALL                                      0  $27     
         55        SEND_VAR                                                 $27
         56        DO_ICALL                                                 
   17    57        INIT_FCALL                                               'var_dump'
         58        INIT_METHOD_CALL                                         !1, 'natsort'
         59        DO_FCALL                                      0  $29     
         60        SEND_VAR                                                 $29
         61        DO_ICALL                                                 
   18    62        INIT_FCALL                                               'var_dump'
         63        INIT_METHOD_CALL                                         !1, 'uasort'
         64        DECLARE_LAMBDA_FUNCTION                          ~31     [2]
         65        SEND_VAL_EX                                              ~31
         66        DO_FCALL                                      0  $32     
         67        SEND_VAR                                                 $32
         68        DO_ICALL                                                 
   19    69        INIT_FCALL                                               'var_dump'
         70        INIT_METHOD_CALL                                         !1, 'uksort'
         71        DECLARE_LAMBDA_FUNCTION                          ~34     [3]
         72        SEND_VAL_EX                                              ~34
         73        DO_FCALL                                      0  $35     
         74        SEND_VAR                                                 $35
         75        DO_ICALL                                                 
   21    76        NEW                                              $37     'RecursiveArrayIterator'
         77        SEND_VAL_EX                                              <array>
         78        DO_FCALL                                      0          
         79        ASSIGN                                                   !2, $37
   23    80        INIT_FCALL                                               'var_dump'
         81        INIT_METHOD_CALL                                         !2, 'asort'
         82        DO_FCALL                                      0  $40     
         83        SEND_VAR                                                 $40
         84        DO_ICALL                                                 
   24    85        INIT_FCALL                                               'var_dump'
         86        INIT_METHOD_CALL                                         !2, 'ksort'
         87        DO_FCALL                                      0  $42     
         88        SEND_VAR                                                 $42
         89        DO_ICALL                                                 
   25    90        INIT_FCALL                                               'var_dump'
         91        INIT_METHOD_CALL                                         !2, 'natcasesort'
         92        DO_FCALL                                      0  $44     
         93        SEND_VAR                                                 $44
         94        DO_ICALL                                                 
   26    95        INIT_FCALL                                               'var_dump'
         96        INIT_METHOD_CALL                                         !2, 'natsort'
         97        DO_FCALL                                      0  $46     
         98        SEND_VAR                                                 $46
         99        DO_ICALL                                                 
   27   100        INIT_FCALL                                               'var_dump'
        101        INIT_METHOD_CALL                                         !2, 'uasort'
        102        DECLARE_LAMBDA_FUNCTION                          ~48     [4]
        103        SEND_VAL_EX                                              ~48
        104        DO_FCALL                                      0  $49     
        105        SEND_VAR                                                 $49
        106        DO_ICALL                                                 
   28   107        INIT_FCALL                                               'var_dump'
        108        INIT_METHOD_CALL                                         !2, 'uksort'
        109        DECLARE_LAMBDA_FUNCTION                          ~51     [5]
        110        SEND_VAL_EX                                              ~51
        111        DO_FCALL                                      0  $52     
        112        SEND_VAR                                                 $52
        113        DO_ICALL                                                 
        114      > 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/dfQkV
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/dfQkV
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/dfQkV
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     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/dfQkV
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   0
          1*     > RETURN                                                   null

End of Dynamic Function 3

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

End of Dynamic Function 4

Dynamic Function 5
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dfQkV
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 5

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
275.18 ms | 1023 KiB | 14 Q