3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); error_reporting(E_ALL); class Foo { private $prop = 'Hello!'; public function show($obj) { echo $obj->prop; } } $obj = new Foo(); $obj->show( new Foo() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BB04j
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   13     3        NEW                                              $2      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   14     6        INIT_METHOD_CALL                                         !0, 'show'
          7        NEW                                              $5      'Foo'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $5
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Foo:
Function show:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BB04j
function name:  show
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      !0, 'prop'
          2        ECHO                                                     ~1
   10     3      > RETURN                                                   null

End of function show

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.07 ms | 1399 KiB | 15 Q