3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Sample; function f1($f) { fwrite($f, "1 called!\n"); } function f2(\resource $f) { fwrite($f, "2 called!\n"); } f1(STDOUT); f2(STDOUT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HVvKr
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_NS_FCALL_BY_NAME                                    'Sample%5Cf1'
          1        FETCH_CONSTANT                                   ~0      'Sample%5CSTDOUT'
          2        SEND_VAL_EX                                              ~0
          3        DO_FCALL                                      0          
   14     4        INIT_NS_FCALL_BY_NAME                                    'Sample%5Cf2'
          5        FETCH_CONSTANT                                   ~2      'Sample%5CSTDOUT'
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function sample%5Cf1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HVvKr
function name:  Sample\f1
number of ops:  6
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_NS_FCALL_BY_NAME                                    'Sample%5Cfwrite'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              '1+called%21%0A'
          4        DO_FCALL                                      0          
    7     5      > RETURN                                                   null

End of function sample%5Cf1

Function sample%5Cf2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HVvKr
function name:  Sample\f2
number of ops:  6
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_NS_FCALL_BY_NAME                                    'Sample%5Cfwrite'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              '2+called%21%0A'
          4        DO_FCALL                                      0          
   11     5      > RETURN                                                   null

End of function sample%5Cf2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.94 ms | 1402 KiB | 17 Q