3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public function m() { return 'm'; } } function a() { return new B(); } /* for ($i=0; $i<10000; $i++) { $ids = []; ($t = a()) && ($v = $t->m()) && $ids[] = $v; } */ for ($i=0; $i<1000000; $i++) { $ids = []; $t = a(); if ($t) { $v = $t->m(); if ($v) { $ids[] = $v; } } } print_r($ids);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 13
filename:       /in/hgN64
function name:  (null)
number of ops:  20
compiled vars:  !0 = $i, !1 = $ids, !2 = $t, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->14
   18     2    >   ASSIGN                                                   !1, <array>
   19     3        INIT_FCALL                                               'a'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !2, $6
   20     6      > JMPZ                                                     !2, ->13
   21     7    >   INIT_METHOD_CALL                                         !2, 'm'
          8        DO_FCALL                                      0  $8      
          9        ASSIGN                                                   !3, $8
   22    10      > JMPZ                                                     !3, ->13
   23    11    >   ASSIGN_DIM                                               !1
         12        OP_DATA                                                  !3
   17    13    >   PRE_INC                                                  !0
         14    >   IS_SMALLER                                               !0, 1000000
         15      > JMPNZ                                                    ~12, ->2
   30    16    >   INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hgN64
function name:  a
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'B'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    9     3*     > RETURN                                                   null

End of function a

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

End of function m

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.35 ms | 1440 KiB | 15 Q