3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = [1, 2, -2]; usort($arr, fn ($a, $b) => $a - $b); print_r($arr); $arr = [0.1, 0.2, -0.2]; usort($arr, fn ($a, $b) => $a - $b); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PBPCR
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'usort'
          2        SEND_REF                                                     !0
          3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          4        SEND_VAL                                                     ~2
          5        DO_ICALL                                                     
    5     6        INIT_FCALL                                                   'print_r'
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                                     
    7     9        ASSIGN                                                       !0, <array>
    8    10        INIT_FCALL                                                   'usort'
         11        SEND_REF                                                     !0
         12        DECLARE_LAMBDA_FUNCTION                              ~6      [1]
         13        SEND_VAL                                                     ~6
         14        DO_ICALL                                                     
    9    15        INIT_FCALL                                                   'print_r'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > 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/PBPCR
function name:  {closure:/in/PBPCR:4}
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 Dynamic Function 0

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

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
131.73 ms | 480 KiB | 9 Q