3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const ALPHA = 1, BETA = 2, GAMMA = 3; public $a = "apple", $b = "bread", $c = "candy"; function showConstants(){ return "{self::ALPHA}{self::BETA}{self::GAMMA}"; } } echo (new Test)->showConstants(); // 123
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bPHnX
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'showConstants'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Class Test:
Function showconstants:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bPHnX
function name:  showConstants
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   '%7Bself%3A%3AALPHA%7D%7Bself%3A%3ABETA%7D%7Bself%3A%3AGAMMA%7D'
    8     1*     > RETURN                                                   null

End of function showconstants

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.73 ms | 1384 KiB | 13 Q