3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function isOk() { return true; } public function isFalse() { return false; } } class SecondClass { function test() { (new Test)->isOk(); var_dump(debug_backtrace()); } } $c = new SecondClass; $c->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIaq7
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'SecondClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function isok:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIaq7
function name:  isOk
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   <true>
    8     1*     > RETURN                                                   null

End of function isok

Function isfalse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIaq7
function name:  isFalse
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   <false>
   13     1*     > RETURN                                                   null

End of function isfalse

End of class Test.

Class SecondClass:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIaq7
function name:  test
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'isOk'
          3        DO_FCALL                                      0          
   22     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'debug_backtrace'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
   23     9      > RETURN                                                   null

End of function test

End of class SecondClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.06 ms | 1401 KiB | 17 Q