3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClassOne { public function myFunctionOne() { echo "<p> My Function One </p>"; } } class MyClassTwo { private $myclassone; function __constructor() { $this->myclassone = new MyClassOne(); var_dump($this->myclassone); } public function myFunctionTwo() { echo "<p> My Function Two </p>"; $this->myclassone->myFunctionOne(); // This crashes the "application" } } $myclassone = new MyClassOne(); $myclassone->myFunctionOne(); $myclasstwo = new MyClassTwo(); $myclasstwo->myFunctionTwo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bT8vU
function name:  (null)
number of ops:  11
compiled vars:  !0 = $myclassone, !1 = $myclasstwo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   NEW                                              $2      'MyClassOne'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   31     3        INIT_METHOD_CALL                                         !0, 'myFunctionOne'
          4        DO_FCALL                                      0          
   32     5        NEW                                              $6      'MyClassTwo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   33     8        INIT_METHOD_CALL                                         !1, 'myFunctionTwo'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class MyClassOne:
Function myfunctionone:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bT8vU
function name:  myFunctionOne
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '%3Cp%3E+My+Function+One+%3C%2Fp%3E'
    8     1      > RETURN                                                   null

End of function myfunctionone

End of class MyClassOne.

Class MyClassTwo:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bT8vU
function name:  __constructor
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'MyClassOne'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'myclassone'
          3        OP_DATA                                                  $1
   18     4        INIT_FCALL                                               'var_dump'
          5        FETCH_OBJ_R                                      ~3      'myclassone'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   19     8      > RETURN                                                   null

End of function __constructor

Function myfunctiontwo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bT8vU
function name:  myFunctionTwo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ECHO                                                     '%3Cp%3E+My+Function+Two+%3C%2Fp%3E'
   24     1        FETCH_OBJ_R                                      ~0      'myclassone'
          2        INIT_METHOD_CALL                                         ~0, 'myFunctionOne'
          3        DO_FCALL                                      0          
   25     4      > RETURN                                                   null

End of function myfunctiontwo

End of class MyClassTwo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
276.64 ms | 1396 KiB | 16 Q