3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { function test1($input) { return strlen($input); } function test2($input) { return strlen($input); } var_dump(test1("test")); // int(4) // Simulate require eval('namespace Foo { function strlen($input) { return 42; }}'); var_dump(test2("test")); // int(42) var_dump(test1("test")); // int(4) }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/de9R0
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ctest1'
          2        SEND_VAL_EX                                              'test'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR_NO_REF_EX                                       $0
          5        DO_FCALL                                      0          
   12     6        INCLUDE_OR_EVAL                                          'namespace+Foo+%7B+function+strlen%28%24input%29+%7B+return+42%3B+%7D%7D', EVAL
   14     7        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          8        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ctest2'
          9        SEND_VAL_EX                                              'test'
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR_NO_REF_EX                                       $3
         12        DO_FCALL                                      0          
   15    13        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
         14        INIT_NS_FCALL_BY_NAME                                    'Foo%5Ctest1'
         15        SEND_VAL_EX                                              'test'
         16        DO_FCALL                                      0  $5      
         17        SEND_VAR_NO_REF_EX                                       $5
         18        DO_FCALL                                      0          
   17    19      > RETURN                                                   1

Function foo%5Ctest1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/de9R0
function name:  Foo\test1
number of ops:  6
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cstrlen'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    5     5*     > RETURN                                                   null

End of function foo%5Ctest1

Function foo%5Ctest2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/de9R0
function name:  Foo\test2
number of ops:  6
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cstrlen'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function foo%5Ctest2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.33 ms | 1396 KiB | 21 Q