3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; function takesRef(&$ref) {} takesRef(count([])); takesRef(\count([]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Irv4C
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5CtakesRef'
          1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ccount'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR_NO_REF_EX                                       $0
          5        DO_FCALL                                      0          
    8     6        INIT_NS_FCALL_BY_NAME                                    'Foo%5CtakesRef'
          7        COUNT                                            ~2      <array>
          8        SEND_VAL_EX                                              ~2
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function foo%5Ctakesref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Irv4C
function name:  Foo\takesRef
number of ops:  2
compiled vars:  !0 = $ref
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function foo%5Ctakesref

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.19 ms | 1014 KiB | 16 Q