3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'var'; $myfunction = function($a,$b) use($var){ return $a[$var]>$b[$var]?-1:$a[$var]!=$b[$var]; }; $arr = array(array('var' => 1)); usort($arr, $myfunction);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SIdl6
function name:  (null)
number of ops:  10
compiled vars:  !0 = $var, !1 = $myfunction, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'var'
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSIdl6%3A4%240'
          2        BIND_LEXICAL                                             ~4, !0
          3        ASSIGN                                                   !1, ~4
    8     4        ASSIGN                                                   !2, <array>
    9     5        INIT_FCALL                                               'usort'
          6        SEND_REF                                                 !2
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSIdl6%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SIdl6
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    5     3        FETCH_DIM_R                                      ~3      !0, !2
          4        FETCH_DIM_R                                      ~4      !1, !2
          5        IS_SMALLER                                               ~4, ~3
          6      > JMPZ                                                     ~5, ->9
          7    >   QM_ASSIGN                                        ~6      -1
          8      > JMP                                                      ->13
          9    >   FETCH_DIM_R                                      ~7      !0, !2
         10        FETCH_DIM_R                                      ~8      !1, !2
         11        IS_NOT_EQUAL                                     ~9      ~7, ~8
         12        QM_ASSIGN                                        ~6      ~9
         13    > > RETURN                                                   ~6
    6    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSIdl6%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.77 ms | 1396 KiB | 15 Q