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 showFruit(){ return self::ALPHA . " {self->a}"; } } echo (new Test)->showFruit(); // 1 apple
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WhCMu
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, 'showFruit'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

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

End of function showfruit

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.5 ms | 1384 KiB | 13 Q