3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $name = 'Paulo'; } class Post { public $name = 'Paulo'; public function check(User $user) { return $user->name === $this->name; } } $user = new User; $post = new Post; $post->check($user); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DPoup
function name:  (null)
number of ops:  10
compiled vars:  !0 = $user, !1 = $post
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $2      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   20     3        NEW                                              $5      'Post'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   22     6        INIT_METHOD_CALL                                         !1, 'check'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
   24     9      > RETURN                                                   1

Class User: [no user functions]
Class Post:
Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DPoup
function name:  check
number of ops:  6
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   16     5*     > RETURN                                                   null

End of function check

End of class Post.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.52 ms | 1393 KiB | 13 Q