3v4l.org

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

Class Renderer:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/10gCI
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/10gCI
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 Renderer.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.97 ms | 1508 KiB | 14 Q