3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myClass { private $a = [ 'foo-test' => [1], '-' => [2], 'bar-test' => [3] ]; private function _mySort($x, $y) { var_dump($this->a); return $x < $y; } public function __construct() { uksort($this->a, [$this, '_mySort']); } } new myClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9n9sX
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $0      'myClass'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Class myClass:
Function _mysort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9n9sX
function name:  _mySort
number of ops:  9
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        INIT_FCALL                                               'var_dump'
          3        FETCH_OBJ_R                                      ~2      'a'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   14     6        IS_SMALLER                                       ~4      !0, !1
          7      > RETURN                                                   ~4
   15     8*     > RETURN                                                   null

End of function _mysort

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9n9sX
function name:  __construct
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'uksort'
          1        FETCH_OBJ_W                                      $0      'a'
          2        SEND_REF                                                 $0
          3        FETCH_THIS                                       ~1      
          4        INIT_ARRAY                                       ~2      ~1
          5        ADD_ARRAY_ELEMENT                                ~2      '_mySort'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
   20     8      > RETURN                                                   null

End of function __construct

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.58 ms | 1395 KiB | 17 Q