3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo{ private function __construct() {} } class bar extends foo{ public function __construct(){ parent::__construct(); } } $f = "foo"; $b = "bar"; new $f(print "f"); new $b(print "b");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uj2tB
function name:  (null)
number of ops:  15
compiled vars:  !0 = $f, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'foo'
   14     1        ASSIGN                                                   !1, 'bar'
   15     2        FETCH_CLASS                                   0  $4      !0
          3        NEW                                              $5      $4
          4        ECHO                                                     'f'
          5        SEND_VAL_EX                                              1
          6        DO_FCALL                                      0          
          7        FREE                                                     $5
   16     8        FETCH_CLASS                                   0  $7      !1
          9        NEW                                              $8      $7
         10        ECHO                                                     'b'
         11        SEND_VAL_EX                                              1
         12        DO_FCALL                                      0          
         13        FREE                                                     $8
         14      > RETURN                                                   1

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

End of function __construct

End of class foo.

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

End of function __construct

End of class bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.73 ms | 1394 KiB | 13 Q