3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace A { function print_r($x) { print 'No print_r for you!'.PHP_EOL; } } namespace A { $x = []; print_r($x); } // It looks like it, but // A\B is not a child of A!! namespace A\B { // Just print_r for you, with fallback print_r($x); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuUL6
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_NS_FCALL_BY_NAME                                    'A%5Cprint_r'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   18     4        INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cprint_r'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   21     7      > RETURN                                                   1

Function a%5Cprint_r:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nuUL6
function name:  A\print_r
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        FETCH_CONSTANT                                   ~1      'A%5CPHP_EOL'
          2        CONCAT                                           ~2      'No+print_r+for+you%21', ~1
          3        ECHO                                                     ~2
    6     4      > RETURN                                                   null

End of function a%5Cprint_r

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.85 ms | 1009 KiB | 14 Q