3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace foo; var_dump(function_exists('foo\strlen')); var_dump(strlen('x')); var_dump(function_exists('foo\strlen')); if (true) { function strlen($x) { return 42; } var_dump(function_exists('foo\strlen')); } var_dump(strlen('x'));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/VLW5O
function name:  (null)
number of ops:  33
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                        'foo%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                        'foo%5Cfunction_exists'
          2        SEND_VAL_EX                                                  'foo%5Cstrlen'
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR_NO_REF_EX                                           $0
          5        DO_FCALL                                          0          
    6     6        INIT_NS_FCALL_BY_NAME                                        'foo%5Cvar_dump'
          7        INIT_NS_FCALL_BY_NAME                                        'foo%5Cstrlen'
          8        SEND_VAL_EX                                                  'x'
          9        DO_FCALL                                          0  $2      
         10        SEND_VAR_NO_REF_EX                                           $2
         11        DO_FCALL                                          0          
    7    12        INIT_NS_FCALL_BY_NAME                                        'foo%5Cvar_dump'
         13        INIT_NS_FCALL_BY_NAME                                        'foo%5Cfunction_exists'
         14        SEND_VAL_EX                                                  'foo%5Cstrlen'
         15        DO_FCALL                                          0  $4      
         16        SEND_VAR_NO_REF_EX                                           $4
         17        DO_FCALL                                          0          
    9    18      > JMPZ                                                         <true>, ->26
   10    19    >   DECLARE_FUNCTION                                             'foo%5Cstrlen'
   11    20        INIT_NS_FCALL_BY_NAME                                        'foo%5Cvar_dump'
         21        INIT_NS_FCALL_BY_NAME                                        'foo%5Cfunction_exists'
         22        SEND_VAL_EX                                                  'foo%5Cstrlen'
         23        DO_FCALL                                          0  $6      
         24        SEND_VAR_NO_REF_EX                                           $6
         25        DO_FCALL                                          0          
   14    26    >   INIT_NS_FCALL_BY_NAME                                        'foo%5Cvar_dump'
         27        INIT_NS_FCALL_BY_NAME                                        'foo%5Cstrlen'
         28        SEND_VAL_EX                                                  'x'
         29        DO_FCALL                                          0  $8      
         30        SEND_VAR_NO_REF_EX                                           $8
         31        DO_FCALL                                          0          
         32      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VLW5O
function name:  foo\strlen
number of ops:  3
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1      > RETURN                                                       42
          2*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.26 ms | 1722 KiB | 16 Q