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 showFruitMsg(){ return self::ALPHA . " {$this->a} a day …"; } } echo (new Test)->showFruitMsg();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lRq08
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $0      'Test'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'showFruitMsg'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Class Test:
Function showfruitmsg:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lRq08
function name:  showFruitMsg
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ROPE_INIT                                     3  ~2      '+'
          1        FETCH_OBJ_R                                      ~0      'a'
          2        ROPE_ADD                                      1  ~2      ~2, ~0
          3        ROPE_END                                      2  ~1      ~2, '+a+day+%E2%80%A6'
          4        CONCAT                                           ~4      '1', ~1
          5      > RETURN                                                   ~4
    7     6*     > RETURN                                                   null

End of function showfruitmsg

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.77 ms | 1393 KiB | 13 Q