3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ConstructorTest1 { class ConstructorTest1 { function ConstructorTest1() { echo "Constructor1 called."; } } } namespace { class ConstructorTest2 { function ConstructorTest2() { echo "Constructor2 called."; } } $test = new ConstructorTest1\ConstructorTest1(); $test = new ConstructorTest2(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FSTrs
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'ConstructorTest1%5CConstructorTest1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        NEW                                              $4      'ConstructorTest2'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   22     6      > RETURN                                                   1

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

End of function constructortest1

End of class ConstructorTest1\ConstructorTest1.

Class ConstructorTest2:
Function constructortest2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FSTrs
function name:  ConstructorTest2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'Constructor2+called.'
   17     1      > RETURN                                                   null

End of function constructortest2

End of class ConstructorTest2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.4 ms | 1393 KiB | 13 Q