3v4l.org

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

Class Test:
Function cube:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sunLu
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:
158.74 ms | 1395 KiB | 17 Q