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(fn(string $label, object $object): string => ucfirst($label));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DTYjM
function name:  (null)
number of ops:  12
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        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          9        SEND_VAL_EX                                                  ~6
         10        DO_FCALL                                          0          
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DTYjM
function name:  {closure:/in/DTYjM:12}
number of ops:  9
compiled vars:  !0 = $label, !1 = $object
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
          0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        INIT_FCALL                                                   'ucfirst'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $2      
          5        VERIFY_RETURN_TYPE                                           $2
          6      > RETURN                                                       $2
          7*       VERIFY_RETURN_TYPE                                           
          8*     > RETURN                                                       null

End of Dynamic Function 0

Class SkipParamUsedAsInvokable:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DTYjM
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/DTYjM
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:
155.78 ms | 1445 KiB | 14 Q