3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App\Modules\Product\Transformer { use App\Modules\Product\Models\ResourceModel; class ResourceTransformer { public function transform(ResourceModel $model) { } } class ColorTransformer extends ResourceTransformer { } } namespace App\Modules\Product\Models { class ResourceModel { } class ColorModel extends ResourceModel { } } namespace { $colorTransformer = new \App\Modules\Product\Transformer\ColorTransformer; $colorModel = new App\Modules\Product\Models\ColorModel; $colorTransformer->transform($colorModel); var_dump($colorModel); var_dump($colorTransformer); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gLUc
function name:  (null)
number of ops:  16
compiled vars:  !0 = $colorTransformer, !1 = $colorModel
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $2      'App%5CModules%5CProduct%5CTransformer%5CColorTransformer'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   35     3        NEW                                              $5      'App%5CModules%5CProduct%5CModels%5CColorModel'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   36     6        INIT_METHOD_CALL                                         !0, 'transform'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
   37     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   38    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   39    15      > RETURN                                                   1

Class App\Modules\Product\Transformer\ResourceTransformer:
Function transform:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gLUc
function name:  transform
number of ops:  2
compiled vars:  !0 = $model
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   null

End of function transform

End of class App\Modules\Product\Transformer\ResourceTransformer.

Class App\Modules\Product\Transformer\ColorTransformer:
Function transform:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6gLUc
function name:  transform
number of ops:  2
compiled vars:  !0 = $model
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   null

End of function transform

End of class App\Modules\Product\Transformer\ColorTransformer.

Class App\Modules\Product\Models\ResourceModel: [no user functions]
Class App\Modules\Product\Models\ColorModel: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.39 ms | 1006 KiB | 14 Q