3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(Foo $foo) { $foo = new Bar; echo get_class($foo); } test(new Foo); class Foo {} class Bar {}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JotfT
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'test'
          1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $0
          4        DO_FCALL                                      0          
   10     5      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JotfT
function name:  test
number of ops:  7
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        NEW                                              $1      'Bar'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    5     4        GET_CLASS                                        ~4      !0
          5        ECHO                                                     ~4
    6     6      > RETURN                                                   null

End of function test

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.09 ms | 1397 KiB | 14 Q