3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $firstName; public $lastName; public function sayHello(){ echo 'Hello ' . $this->firstName . ' ' . $this->lastName; return $this; } public function register(){ echo 'Registered ' . $this->firstName; return $this; } public function mail(){ echo 'Emailed'; } } $user1 = new User(); $user1->firstName = 'John'; $user1->lastName = 'Doe'; $user1->sayHello()->register()->mail();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6h5pe
function name:  (null)
number of ops:  14
compiled vars:  !0 = $user1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        ASSIGN_OBJ                                               !0, 'firstName'
          4        OP_DATA                                                  'John'
   27     5        ASSIGN_OBJ                                               !0, 'lastName'
          6        OP_DATA                                                  'Doe'
   28     7        INIT_METHOD_CALL                                         !0, 'sayHello'
          8        DO_FCALL                                      0  $6      
          9        INIT_METHOD_CALL                                         $6, 'register'
         10        DO_FCALL                                      0  $7      
         11        INIT_METHOD_CALL                                         $7, 'mail'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Class User:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6h5pe
function name:  sayHello
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1        CONCAT                                           ~1      'Hello+', ~0
          2        CONCAT                                           ~2      ~1, '+'
          3        FETCH_OBJ_R                                      ~3      'lastName'
          4        CONCAT                                           ~4      ~2, ~3
          5        ECHO                                                     ~4
    9     6        FETCH_THIS                                       ~5      
          7      > RETURN                                                   ~5
   10     8*     > RETURN                                                   null

End of function sayhello

Function register:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6h5pe
function name:  register
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'firstName'
          1        CONCAT                                           ~1      'Registered+', ~0
          2        ECHO                                                     ~1
   14     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   15     5*     > RETURN                                                   null

End of function register

Function mail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6h5pe
function name:  mail
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ECHO                                                     'Emailed'
   19     1      > RETURN                                                   null

End of function mail

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.94 ms | 1012 KiB | 13 Q