3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class FooClass { public function test() { echo "Hello World"; } } } namespace Bar { $className = 'Foo\\FooClass'; $a = new $className(); $a->test(); $b = new Foo\FooClass(); $b->test(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iqHLW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $className, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 'Foo%5CFooClass'
   13     1        FETCH_CLASS                                   0  $4      !0
          2        NEW                                              $5      $4
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
   14     5        INIT_METHOD_CALL                                         !1, 'test'
          6        DO_FCALL                                      0          
   16     7        NEW                                              $9      'Bar%5CFoo%5CFooClass'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $9
   17    10        INIT_METHOD_CALL                                         !2, 'test'
         11        DO_FCALL                                      0          
   18    12      > RETURN                                                   1

Class Foo\FooClass:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iqHLW
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     'Hello+World'
    7     1      > RETURN                                                   null

End of function test

End of class Foo\FooClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.12 ms | 1393 KiB | 13 Q