3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new class { /** @var \PHPStan\Parser\Parser */ private $parser; /** @var \PHPStan\Parser\FunctionCallStatementFinder */ private $functionCallStatementFinder; public function create(\PHPStan\Reflection\ClassReflection $declaringClass, \ReflectionMethod $reflection) : \PHPStan\Reflection\Php\PhpMethodReflection { return new \PHPStan\Reflection\Php\PhpMethodReflection($declaringClass, $reflection, $this->parser, $this->functionCallStatementFinder, true); } }; $obj2 = new class { /** @var \PHPStan\Parser\Parser */ private $parser; /** @var \PHPStan\Parser\FunctionCallStatementFinder */ private $functionCallStatementFinder; public function create(\PHPStan\Reflection\ClassReflection $declaringClass, \ReflectionMethod $reflection) : \PHPStan\Reflection\Php\PhpMethodReflection { return new \PHPStan\Reflection\Php\PhpMethodReflection($declaringClass, $reflection, $this->parser, $this->functionCallStatementFinder, true); } }; var_dump((new \ReflectionClass($obj))->getName()); var_dump((new \ReflectionClass($obj2))->getName());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VCcUU
function name:  (null)
number of ops:  25
compiled vars:  !0 = $obj, !1 = $obj2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <true>  
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   14     4        DECLARE_ANON_CLASS                               <unknown> 
          5        NEW                                              $7      $6
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
   25     8        INIT_FCALL                                               'var_dump'
          9        NEW                                              $10     'ReflectionClass'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
         12        INIT_METHOD_CALL                                         $10, 'getName'
         13        DO_FCALL                                      0  $12     
         14        SEND_VAR                                                 $12
         15        DO_ICALL                                                 
   26    16        INIT_FCALL                                               'var_dump'
         17        NEW                                              $14     'ReflectionClass'
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0          
         20        INIT_METHOD_CALL                                         $14, 'getName'
         21        DO_FCALL                                      0  $16     
         22        SEND_VAR                                                 $16
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class class@anonymous:
Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VCcUU
function name:  create
number of ops:  17
compiled vars:  !0 = $declaringClass, !1 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        NEW                                              $2      'PHPStan%5CReflection%5CPhp%5CPhpMethodReflection'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $3      'parser'
          7        SEND_FUNC_ARG                                            $3
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $4      'functionCallStatementFinder'
         10        SEND_FUNC_ARG                                            $4
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
         13        VERIFY_RETURN_TYPE                                       $2
         14      > RETURN                                                   $2
   12    15*       VERIFY_RETURN_TYPE                                       
         16*     > RETURN                                                   null

End of function create

End of class class@anonymous.

Class class@anonymous:
Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VCcUU
function name:  create
number of ops:  17
compiled vars:  !0 = $declaringClass, !1 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   22     2        NEW                                              $2      'PHPStan%5CReflection%5CPhp%5CPhpMethodReflection'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $3      'parser'
          7        SEND_FUNC_ARG                                            $3
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $4      'functionCallStatementFinder'
         10        SEND_FUNC_ARG                                            $4
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
         13        VERIFY_RETURN_TYPE                                       $2
         14      > RETURN                                                   $2
   23    15*       VERIFY_RETURN_TYPE                                       
         16*     > RETURN                                                   null

End of function create

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.85 ms | 1400 KiB | 15 Q