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/pJPaC
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/pJPaC
function name:  showAll
number of ops:  14
compiled vars:  !0 = $constants, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '123'
    8     1        ROPE_INIT                                     6  ~7      '+'
          2        FETCH_OBJ_R                                      ~3      'a'
          3        ROPE_ADD                                      1  ~7      ~7, ~3
          4        ROPE_ADD                                      2  ~7      ~7, '+'
          5        FETCH_OBJ_R                                      ~4      'b'
          6        ROPE_ADD                                      3  ~7      ~7, ~4
          7        ROPE_ADD                                      4  ~7      ~7, '+'
          8        FETCH_OBJ_R                                      ~5      'c'
          9        ROPE_END                                      5  ~6      ~7, ~5
         10        ASSIGN                                                   !1, ~6
    9    11        CONCAT                                           ~11     !0, !1
         12      > RETURN                                                   ~11
   10    13*     > RETURN                                                   null

End of function showall

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.08 ms | 1394 KiB | 13 Q