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(); $filter = function($f) { return $f->getData(); }; $array = array_map($f, $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/op69q
function name:  (null)
number of ops:  22
compiled vars:  !0 = $set, !1 = $f, !2 = $array, !3 = $filter
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                                         $5      
          5      > FE_RESET_R                                       $6      $5, ->12
          6    > > FE_FETCH_R                                               $6, !1, ->12
   10     7    >   NEW                                              $8      'Foo'
          8        DO_FCALL                                      0          
          9        ASSIGN_DIM                                               !0
         10        OP_DATA                                                  $8
    9    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $6
   14    13        ASSIGN                                                   !2, <array>
   15    14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fop69q%3A15%240'
         15        ASSIGN                                                   !3, ~11
   16    16        INIT_FCALL                                               'array_map'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $13     
         20        ASSIGN                                                   !2, $13
         21      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fop69q%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/op69q
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     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%2Fop69q%3A15%240

Class Foo:
Function getdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/op69q
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:
153.94 ms | 1396 KiB | 17 Q