3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getCount(&$a) { return count($a); } $cnt = getCount( $foo ); var_dump($cnt); // и если сделать так $cnt = getCount( $foo['bar'] ); var_dump($cnt); //EOF//
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EV9Fh
function name:  (null)
number of ops:  16
compiled vars:  !0 = $cnt, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'getcount'
          1        SEND_REF                                                 !1
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    6     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   11     7        INIT_FCALL                                               'getcount'
          8        FETCH_DIM_W                                      $5      !1, 'bar'
          9        SEND_REF                                                 $5
         10        DO_FCALL                                      0  $6      
         11        ASSIGN                                                   !0, $6
   12    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                                 
   14    15      > RETURN                                                   1

Function getcount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EV9Fh
function name:  getCount
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        COUNT                                            ~1      !0
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function getcount

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.51 ms | 1397 KiB | 17 Q