3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $test = null; public $anything = true; private function getTest() { return $this->test; } } function doStuff() { echo $this->test; echo $this->getTest(); echo $this->anything; } $a = new A(); $fn = doStuff->bindTo($a, $a); $fn();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4hfH
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $fn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   27     3        FETCH_CONSTANT                                   ~5      'doStuff'
          4        INIT_METHOD_CALL                                         ~5, 'bindTo'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !1, $6
   28     9        INIT_DYNAMIC_CALL                                        !1
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A4hfH
function name:  doStuff
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'test'
          2        ECHO                                                     ~1
   21     3        FETCH_THIS                                       $2      
          4        INIT_METHOD_CALL                                         $2, 'getTest'
          5        DO_FCALL                                      0  $3      
          6        ECHO                                                     $3
   23     7        FETCH_THIS                                       $4      
          8        FETCH_OBJ_R                                      ~5      $4, 'anything'
          9        ECHO                                                     ~5
   24    10      > RETURN                                                   null

End of function dostuff

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

End of function gettest

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.81 ms | 1395 KiB | 13 Q