3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $x = 123; } class X { public function foo(\A $a) { echo $a->x; } } $aa = new \A; $xx = new \X; $xx->foo($aa); $xx->foo(null);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNc7t
function name:  (null)
number of ops:  13
compiled vars:  !0 = $aa, !1 = $xx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        NEW                                              $5      'X'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   19     6        INIT_METHOD_CALL                                         !1, 'foo'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
   20     9        INIT_METHOD_CALL                                         !1, 'foo'
         10        SEND_VAL_EX                                              null
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Class A: [no user functions]
Class X:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNc7t
function name:  foo
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_OBJ_R                                      ~1      !0, 'x'
          2        ECHO                                                     ~1
   13     3      > RETURN                                                   null

End of function foo

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
229.17 ms | 994 KiB | 13 Q