3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $test; public function getTest() { return $this->test; } public function setTest($test) { $this->test = $test; } } $foo = new Foo; $foo->setTest('test'); $bar = (array) $foo; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qDt9j
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        INIT_METHOD_CALL                                         !0, 'setTest'
          4        SEND_VAL_EX                                              'test'
          5        DO_FCALL                                      0          
   20     6        CAST                                          7  ~6      !0
          7        ASSIGN                                                   !1, ~6
   21     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function gettest

Function settest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qDt9j
function name:  setTest
number of ops:  4
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               'test'
          2        OP_DATA                                                  !0
   14     3      > RETURN                                                   null

End of function settest

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.97 ms | 1387 KiB | 15 Q