3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestField{ public function __construct($name = ''){ echo "TestField constructed $name"; } } $field = 'tesst'; $fieldfield = $field . 'field'; if(class_exists($fieldfield)){ new $fieldfield(); } else { new TestField('Else'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5gdeI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $field, !1 = $fieldfield
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'tesst'
    9     1        CONCAT                                           ~3      !0, 'field'
          2        ASSIGN                                                   !1, ~3
   10     3        INIT_FCALL                                               'class_exists'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6      > JMPZ                                                     $5, ->12
   11     7    >   FETCH_CLASS                                   0  $6      !1
          8        NEW                                              $7      $6
          9        DO_FCALL                                      0          
         10        FREE                                                     $7
         11      > JMP                                                      ->16
   13    12    >   NEW                                              $9      'TestField'
         13        SEND_VAL_EX                                              'Else'
         14        DO_FCALL                                      0          
         15        FREE                                                     $9
   14    16    > > RETURN                                                   1

Class TestField:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5gdeI
function name:  __construct
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      ''
    5     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      'TestField+constructed+', !0
          3        ECHO                                                     ~1
    6     4      > RETURN                                                   null

End of function __construct

End of class TestField.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.84 ms | 1400 KiB | 15 Q