3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class TestField{ public function __construct(){ echo "TestField constructed"; } } $field = 'test'; $fieldfield = $field . 'field'; new $fieldfield();
based on Ys6HL
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/7bJKP
function name:  (null)
number of ops:  8
compiled vars:  !0 = $field, !1 = $fieldfield
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   8     1        ASSIGN                                                   !0, 'test'
   9     2        CONCAT                                           ~4      !0, 'field'
         3        ASSIGN                                                   !1, ~4
  10     4        FETCH_CLASS                                 512  :6      !1
         5        NEW                                                      :6
         6        DO_FCALL                                      0          
         7      > RETURN                                                   1

Class TestField:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/7bJKP
function name:  __construct
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   ECHO                                                     'TestField+constructed'
   6     1      > RETURN                                                   null

End of function __construct

End of class TestField.

Generated using Vulcan Logic Dumper, using php 7.3.0