3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new class { public $user = "XYZ"; public function getUser() { return $this->user; } }; var_dump($test); echo $test->getUser();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aGvVM
function name:  (null)
number of ops:  11
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   10     7        INIT_METHOD_CALL                                         !0, 'getUser'
          8        DO_FCALL                                      0  $6      
          9        ECHO                                                     $6
         10      > RETURN                                                   1

Class class@anonymous:
Function getuser:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aGvVM
function name:  getUser
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_OBJ_R                                      ~0      'user'
          1      > RETURN                                                   ~0
    7     2*     > RETURN                                                   null

End of function getuser

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.09 ms | 1394 KiB | 15 Q