3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C{ public $x; public function setX($x) { $this->x = $x; return $this; } public function getX() { return $this->x; } } $c = new C(); $c->setX(12); echo $c->getX();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y3G8V
function name:  (null)
number of ops:  10
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'setX'
          4        SEND_VAL_EX                                              12
          5        DO_FCALL                                      0          
   16     6        INIT_METHOD_CALL                                         !0, 'getX'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class C:
Function setx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y3G8V
function name:  setX
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'x'
          2        OP_DATA                                                  !0
    6     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
    7     5*     > RETURN                                                   null

End of function setx

Function getx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y3G8V
function name:  getX
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'x'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function getx

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.18 ms | 1394 KiB | 13 Q