3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThingDoer { protected $things; public function __construct(string $string = NULL, int $int = 0) { $this->things[] = $string; $this->things[] = $int; } public function do() { print_r($this->things); } } $thing = new ThingDoer(); $thing->do();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmVhr
function name:  (null)
number of ops:  6
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'ThingDoer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'do'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class ThingDoer:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmVhr
function name:  __construct
number of ops:  9
compiled vars:  !0 = $string, !1 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      0
    6     2        FETCH_OBJ_W                                      $2      'things'
          3        ASSIGN_DIM                                               $2
          4        OP_DATA                                                  !0
    7     5        FETCH_OBJ_W                                      $4      'things'
          6        ASSIGN_DIM                                               $4
          7        OP_DATA                                                  !1
    8     8      > RETURN                                                   null

End of function __construct

Function do:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmVhr
function name:  do
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'print_r'
          1        FETCH_OBJ_R                                      ~0      'things'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   11     4      > RETURN                                                   null

End of function do

End of class ThingDoer.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.67 ms | 1395 KiB | 15 Q