3v4l.org

run code in 500+ PHP versions simultaneously
<?php // pre-requisite $a = 'a'; const ab = 'ab'; class ab { function __construct() { echo __METHOD__.PHP_EOL; } } // create classes new ab; new ab(); new (ab); new ($a.'b'); new (ab::class); // PHP 9, a wish! //new ()ab; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K2ZrD
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'a'
    5     1        DECLARE_CONST                                                'ab', 'ab'
   11     2        NEW                                                  $2      'ab'
          3        DO_FCALL                                          0          
          4        FREE                                                         $2
   12     5        NEW                                                  $4      'ab'
          6        DO_FCALL                                          0          
          7        FREE                                                         $4
   13     8        FETCH_CONSTANT                                       ~6      'ab'
          9        FETCH_CLASS                                       0  $7      ~6
         10        NEW                                                  $8      $7
         11        DO_FCALL                                          0          
         12        FREE                                                         $8
   14    13        CONCAT                                               ~10     !0, 'b'
         14        FETCH_CLASS                                       0  $11     ~10
         15        NEW                                                  $12     $11
         16        DO_FCALL                                          0          
         17        FREE                                                         $12
   15    18        NEW                                                  $14     'ab'
         19        DO_FCALL                                          0          
         20        FREE                                                         $14
   20    21      > RETURN                                                       1

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

End of function __construct

End of class ab.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.51 ms | 1474 KiB | 13 Q