3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function getData() { return true; } } $set = array(); foreach(range(1, 2000) as $f) { $set[] = new Foo; } $array = array(); $array = array_map(function($f) { return $f->getData(); }, $set);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/tTTeF
function name:  (null)
number of ops:  21
compiled vars:  !0 = $set, !1 = $f, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 2000
          4        DO_ICALL                                         $4      
          5      > FE_RESET_R                                       $5      $4, ->12
          6    > > FE_FETCH_R                                               $5, !1, ->12
   10     7    >   NEW                                              $7      'Foo'
          8        DO_FCALL                                      0          
          9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  $7
    9    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $5
   14    13        ASSIGN                                                   !2, <array>
   15    14        INIT_FCALL                                               'array_map'
         15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtTTeF%3A15%240'
         16        SEND_VAL                                                 ~10
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !2, $11
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FtTTeF%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTTeF
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        INIT_METHOD_CALL                                         !0, 'getData'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtTTeF%3A15%240

Class Foo:
Function getdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tTTeF
function name:  getData
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   <true>
    5     1*     > RETURN                                                   null

End of function getdata

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.43 ms | 1388 KiB | 17 Q