3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { private $value = 2; public function getValue(){ return $this->value; } public function setValue($value){ $this->value = $value; return true; } } $test = new Test(); $test->setValue(2333); echo $test->getValue();
based on GYacF
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Kbpe5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  15     1        NEW                                              $2      :-6
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  16     4        INIT_METHOD_CALL                                         !0, 'setValue'
         5        SEND_VAL_EX                                              2333
         6        DO_FCALL                                      0          
  17     7        INIT_METHOD_CALL                                         !0, 'getValue'
         8        DO_FCALL                                      0  $6      
         9        ECHO                                                     $6
        10      > RETURN                                                   1

Class Test:
Function getvalue:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Kbpe5
function name:  getValue
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   FETCH_OBJ_R                                      $0      'value'
         1      > RETURN                                                   $0
   7     2*     > RETURN                                                   null

End of function getvalue

Function setvalue:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Kbpe5
function name:  setValue
number of ops:  5
compiled vars:  !0 = $value
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   8     0  E >   RECV                                             !0      
   9     1        ASSIGN_OBJ                                               'value'
         2        OP_DATA                                                  !0
  11     3      > RETURN                                                   <true>
  12     4*     > RETURN                                                   null

End of function setvalue

End of class Test.

Generated using Vulcan Logic Dumper, using php 7.3.0