3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Itesti { public function hello(); } class testi { public function test(Itesti $temp) { $temp->hello(); } } $temp = new testi(); $temp->test(new class implements Itesti{ public function hello() { throw new Exception("NOOOOU"); } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k9MHZ
function name:  (null)
number of ops:  10
compiled vars:  !0 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'testi'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DECLARE_ANON_CLASS                               <unknown> 
          5        NEW                                              $5      $4
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $5
          8        DO_FCALL                                      0          
   21     9      > RETURN                                                   1

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

End of function hello

End of class Itesti.

Class testi:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k9MHZ
function name:  test
number of ops:  4
compiled vars:  !0 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_METHOD_CALL                                         !0, 'hello'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function test

End of class testi.

Class Itesti@anonymous:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/k9MHZ
function name:  hello
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'Exception'
          1        SEND_VAL_EX                                              'NOOOOU'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   20     4*     > RETURN                                                   null

End of function hello

End of class Itesti@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.42 ms | 1395 KiB | 13 Q