3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SkipCallableParamAssignFluentMultiParams { private $transform; public function withTransform(callable $callable) { $this->transform = $callable; return $this; } public function run($value, $optionalData = []) { var_dump(($this->transform)($value, $optionalData)); } } (new SkipCallableParamAssignFluentMultiParams()) ->withTransform(trim(...)) ->run(' some data ');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kku6
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'SkipCallableParamAssignFluentMultiParams'
          1        DO_FCALL                                      0          
   20     2        INIT_METHOD_CALL                                         $0, 'withTransform'
          3        INIT_FCALL                                               'trim'
          4        ZEND_CALLABLE_CONVERT                            ~2      
          5        SEND_VAL_EX                                              ~2
          6        DO_FCALL                                      0  $3      
   21     7        INIT_METHOD_CALL                                         $3, 'run'
          8        SEND_VAL_EX                                              '++some+data++'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class SkipCallableParamAssignFluentMultiParams:
Function withtransform:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kku6
function name:  withTransform
number of ops:  6
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'transform'
          2        OP_DATA                                                  !0
   10     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   11     5*     > RETURN                                                   null

End of function withtransform

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8kku6
function name:  run
number of ops:  11
compiled vars:  !0 = $value, !1 = $optionalData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <array>
   15     2        INIT_FCALL                                               'var_dump'
          3        FETCH_OBJ_R                                      ~2      'transform'
          4        INIT_DYNAMIC_CALL                                        ~2
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
   16    10      > RETURN                                                   null

End of function run

End of class SkipCallableParamAssignFluentMultiParams.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.69 ms | 1015 KiB | 15 Q