3v4l.org

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

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

End of function setm

Function getm:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7jkie
function name:  getM
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'm'
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function getm

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
249.03 ms | 1007 KiB | 13 Q