3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Duplicator { private function transform($value) { return $value * 2; } public function getTransformed($stuff) { return array_map(array($this, 'transform'), $stuff); } } $duplicator = new Duplicator(); $stuff = array(1,2,3); var_dump($duplicator->getTransformed($stuff));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGtCV
function name:  (null)
number of ops:  11
compiled vars:  !0 = $duplicator, !1 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Duplicator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        ASSIGN                                                   !1, <array>
   18     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getTransformed'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function transform

Function gettransformed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGtCV
function name:  getTransformed
number of ops:  10
compiled vars:  !0 = $stuff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'array_map'
          2        FETCH_THIS                                       ~1      
          3        INIT_ARRAY                                       ~2      ~1
          4        ADD_ARRAY_ELEMENT                                ~2      'transform'
          5        SEND_VAL                                                 ~2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
   12     9*     > RETURN                                                   null

End of function gettransformed

End of class Duplicator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.26 ms | 1388 KiB | 17 Q