3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ai = new ArrayIterator(array(1,3,2)); $ai->uasort(function ($a, $b) {return $a - $b;}); var_dump(iterator_to_array($ai));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rv61G
function name:  (null)
number of ops:  15
compiled vars:  !0 = $ai
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        INIT_METHOD_CALL                                         !0, 'uasort'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FRv61G%3A4%240'
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0          
    5     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'iterator_to_array'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        SEND_VAR                                                 $6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FRv61G%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rv61G
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     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%2FRv61G%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.21 ms | 940 KiB | 18 Q