3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Batata { public $name; private $secret; public function setSecret($value) { $this->secret = $value; } } $potato = new Batata(); $potato->name = 'teste'; $potato->job = 'Batatinha'; // Atribuição dinâmica $potato->setSecret('Im a banana'); var_dump((array) $potato);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ts0S8
function name:  (null)
number of ops:  15
compiled vars:  !0 = $potato
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Batata'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        ASSIGN_OBJ                                               !0, 'name'
          4        OP_DATA                                                  'teste'
   14     5        ASSIGN_OBJ                                               !0, 'job'
          6        OP_DATA                                                  'Batatinha'
   15     7        INIT_METHOD_CALL                                         !0, 'setSecret'
          8        SEND_VAL_EX                                              'Im+a+banana'
          9        DO_FCALL                                      0          
   17    10        INIT_FCALL                                               'var_dump'
         11        CAST                                          7  ~7      !0
         12        SEND_VAL                                                 ~7
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Batata:
Function setsecret:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ts0S8
function name:  setSecret
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'secret'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function setsecret

End of class Batata.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.47 ms | 1395 KiB | 15 Q