3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function cube($n) { return($n * $n * $n); } } $a = array(1, 2, 3, 4, 5); $b = array_map(Test::cube, $a); print_r($b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j4hgI
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_map'
          2        FETCH_CLASS_CONSTANT                             ~3      'Test', 'cube'
          3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   12     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function cube

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.54 ms | 1386 KiB | 17 Q