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

Class Test:
Function showall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/goPcQ
function name:  showAll
number of ops:  13
compiled vars:  !0 = $constants, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '123'
    8     1        FETCH_OBJ_R                                      ~3      'a'
          2        ROPE_INIT                                     5  ~7      ~3
          3        ROPE_ADD                                      1  ~7      ~7, '+'
          4        FETCH_OBJ_R                                      ~4      'b'
          5        ROPE_ADD                                      2  ~7      ~7, ~4
          6        ROPE_ADD                                      3  ~7      ~7, '+'
          7        FETCH_OBJ_R                                      ~5      'c'
          8        ROPE_END                                      4  ~6      ~7, ~5
          9        ASSIGN                                                   !1, ~6
    9    10        CONCAT                                           ~11     !0, !1
         11      > RETURN                                                   ~11
   10    12*     > RETURN                                                   null

End of function showall

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.95 ms | 1385 KiB | 13 Q