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

Class Test:
Function showprops:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1hqU1
function name:  showProps
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        ROPE_INIT                                     5  ~4      ~0
          2        ROPE_ADD                                      1  ~4      ~4, '+'
          3        FETCH_OBJ_R                                      ~1      'b'
          4        ROPE_ADD                                      2  ~4      ~4, ~1
          5        ROPE_ADD                                      3  ~4      ~4, '+'
          6        FETCH_OBJ_R                                      ~2      'c'
          7        ROPE_END                                      4  ~3      ~4, ~2
          8      > RETURN                                                   ~3
    8     9*     > RETURN                                                   null

End of function showprops

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.89 ms | 1394 KiB | 13 Q