3v4l.org

run code in 300+ PHP versions simultaneously
<?php class array_sort { protected $_asort; public function __construct(array $asort) { $this->_asort = $asort; } public function alhsort() { $sorted = $this->_asort; sort($sorted); return $sorted; } } $sortarray = new array_sort(array(11, -2, 4, 35, 0, 8, -9)); print_r($sortarray->alhsort()); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/03voW
function name:  (null)
number of ops:  10
compiled vars:  !0 = $sortarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'array_sort'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   18     4        INIT_FCALL                                               'print_r'
          5        INIT_METHOD_CALL                                         !0, 'alhsort'
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   19     9      > RETURN                                                   1

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

End of function __construct

Function alhsort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/03voW
function name:  alhsort
number of ops:  7
compiled vars:  !0 = $sorted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~1      '_asort'
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_FCALL                                               'sort'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
   14     5      > RETURN                                                   !0
   15     6*     > RETURN                                                   null

End of function alhsort

End of class array_sort.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.61 ms | 1395 KiB | 17 Q