3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct(){ echo __CLASS__; $x = __CLASS__; $x = new $x(); } } new A();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/soeku
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'A'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.82 ms | 1393 KiB | 13 Q