3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $val; public function __construct($val) { $this->$val = $val; } } $arr = array( 'one' => new test(10), 'two' => new test(1), 'three' => new test(5) ); uasort($arr, function (test $a, test $b) { if ($a->val == $b->val) { return 0; } return ($a->val < $b->val) ? -1 : 1; });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HXtS
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'test'
          1        SEND_VAL_EX                                              10
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~3      $1, 'one'
   14     4        NEW                                              $4      'test'
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~3      $4, 'two'
   15     8        NEW                                              $6      'test'
          9        SEND_VAL_EX                                              5
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~3      $6, 'three'
   12    12        ASSIGN                                                   !0, ~3
   18    13        INIT_FCALL                                               'uasort'
         14        SEND_REF                                                 !0
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2HXtS%3A18%240'
   24    16        SEND_VAL                                                 ~9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F2HXtS%3A18%240

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2HXtS
function name:  __construct
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               !0
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.31 ms | 1400 KiB | 15 Q