3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X{ public function createCost() { $cost_example = array(1,2,3); function checkDescription($array_item) { return $array_item; } $array_mapped = array_map('checkDescription', $cost_example); print_r($array_mapped); } } $x = new X(); $x->createCost();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nft7o
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'createCost'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00checkdescription%2Fin%2FNft7o%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nft7o
function name:  checkDescription
number of ops:  3
compiled vars:  !0 = $array_item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   !0
   10     2*     > RETURN                                                   null

End of function %00checkdescription%2Fin%2FNft7o%3A7%240

Class X:
Function createcost:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Nft7o
function name:  createCost
number of ops:  11
compiled vars:  !0 = $cost_example, !1 = $array_mapped
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    7     1        DECLARE_FUNCTION                                         'checkdescription'
   12     2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'checkDescription'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   13     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   14    10      > RETURN                                                   null

End of function createcost

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.36 ms | 1395 KiB | 17 Q