3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { private $myVar = 'bottle'; public function test() { // call the function inside the object return $this->message(); } public function message() { return "My message in a {$this->myVar}. :)"; } } $object = new Example; echo $object->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5vV1
function name:  (null)
number of ops:  7
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class Example:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5vV1
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_METHOD_CALL                                         'message'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
    9     3*     > RETURN                                                   null

End of function test

Function message:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L5vV1
function name:  message
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ROPE_INIT                                     3  ~2      'My+message+in+a+'
          1        FETCH_OBJ_R                                      ~0      'myVar'
          2        ROPE_ADD                                      1  ~2      ~2, ~0
          3        ROPE_END                                      2  ~1      ~2, '.+%3A%29'
          4      > RETURN                                                   ~1
   13     5*     > RETURN                                                   null

End of function message

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.23 ms | 1394 KiB | 13 Q