3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo{} class bar extends foo{} class foobar { function startTest() { $bar = new bar(); $this->test($bar); } function test($testObject) { print_r(get_class($testObject)); } } $foobar = new foobar(); $foobar->startTest();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cudMK
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'foobar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'startTest'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class foo: [no user functions]
Class bar: [no user functions]
Class foobar:
Function starttest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cudMK
function name:  startTest
number of ops:  7
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         'test'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   12     6      > RETURN                                                   null

End of function starttest

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cudMK
function name:  test
number of ops:  6
compiled vars:  !0 = $testObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'print_r'
          2        GET_CLASS                                        ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
   16     5      > RETURN                                                   null

End of function test

End of class foobar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.78 ms | 1395 KiB | 15 Q