3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; private $b; public function __construct() { unset($this->a, $this->b); } public function __get(string $name) { $this->a = 123; $this->b = 'abc'; return $this->$name; } public function saySomething() : string { return $this->a . $this->b; } } echo (new Foo())->saySomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rn39Q
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'saySomething'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rn39Q
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   UNSET_OBJ                                                'a'
          1        UNSET_OBJ                                                'b'
    8     2      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rn39Q
function name:  __get
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  123
   11     3        ASSIGN_OBJ                                               'b'
          4        OP_DATA                                                  'abc'
   12     5        FETCH_OBJ_R                                      ~3      !0
          6      > RETURN                                                   ~3
   13     7*     > RETURN                                                   null

End of function __get

Function saysomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rn39Q
function name:  saySomething
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        FETCH_OBJ_R                                      ~1      'b'
          2        CONCAT                                           ~2      ~0, ~1
          3        VERIFY_RETURN_TYPE                                       ~2
          4      > RETURN                                                   ~2
   16     5*       VERIFY_RETURN_TYPE                                       
          6*     > RETURN                                                   null

End of function saysomething

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.73 ms | 1395 KiB | 13 Q