3v4l.org

run code in 500+ PHP versions simultaneously
<?php final readonly class SkipParamUsedAsInvokable { public function __construct(private string $name, private object $object) {} public function render(callable $formatter): string { return $formatter($this->name, $this->object); } } $obj = new SkipParamUsedAsInvokable('name', new \stdClass()); $obj->render(ucfirst(...));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0rfo
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'SkipParamUsedAsInvokable'
          1        SEND_VAL_EX                                                  'name'
          2        NEW                                                  $2      'stdClass'
          3        DO_FCALL                                          0          
          4        SEND_VAR_NO_REF_EX                                           $2
          5        DO_FCALL                                          0          
          6        ASSIGN                                                       !0, $1
   12     7        INIT_METHOD_CALL                                             !0, 'render'
          8        INIT_FCALL                                                   'ucfirst'
          9        CALLABLE_CONVERT                                     ~6      
         10        SEND_VAL_EX                                                  ~6
         11        DO_FCALL                                          0          
         12      > RETURN                                                       1

Class SkipParamUsedAsInvokable:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0rfo
function name:  __construct
number of ops:  7
compiled vars:  !0 = $name, !1 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        ASSIGN_OBJ                                                   'name'
          3        OP_DATA                                                      !0
          4        ASSIGN_OBJ                                                   'object'
          5        OP_DATA                                                      !1
          6      > RETURN                                                       null

End of function __construct

Function render:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G0rfo
function name:  render
number of ops:  13
compiled vars:  !0 = $formatter
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        INIT_DYNAMIC_CALL                                            !0
          2        CHECK_FUNC_ARG                                               
          3        FETCH_OBJ_FUNC_ARG                                   $1      'name'
          4        SEND_FUNC_ARG                                                $1
          5        CHECK_FUNC_ARG                                               
          6        FETCH_OBJ_FUNC_ARG                                   $2      'object'
          7        SEND_FUNC_ARG                                                $2
          8        DO_FCALL                                          0  $3      
          9        VERIFY_RETURN_TYPE                                           $3
         10      > RETURN                                                       $3
    8    11*       VERIFY_RETURN_TYPE                                           
         12*     > RETURN                                                       null

End of function render

End of class SkipParamUsedAsInvokable.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.7 ms | 1476 KiB | 14 Q