3v4l.org

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

Class Sorter:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ntCr7
function name:  __construct
number of ops:  9
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        COUNT                                            ~2      !0
          2        ASSIGN_OBJ                                               'data'
          3        OP_DATA                                                  ~2
    6     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~3      'data'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    7     8      > RETURN                                                   null

End of function __construct

End of class Sorter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.01 ms | 997 KiB | 14 Q