3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! namespace Test { function error_reporting($new_level = null) { $arguments = array_slice(array($new_level), func_num_args()); $refFunc = new \ReflectionFunction('error_reporting'); return $refFunc->invokeArgs($arguments); } } namespace { echo Test\error_reporting(); Test\error_reporting(3); echo Test\error_reporting(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35Wu4
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test%5Cerror_reporting'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   14     3        INIT_FCALL                                               'test%5Cerror_reporting'
          4        SEND_VAL                                                 3
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'test%5Cerror_reporting'
          7        DO_FCALL                                      0  $2      
          8        ECHO                                                     $2
   16     9      > RETURN                                                   1

Function test%5Cerror_reporting:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35Wu4
function name:  Test\error_reporting
number of ops:  18
compiled vars:  !0 = $new_level, !1 = $arguments, !2 = $refFunc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    6     1        INIT_NS_FCALL_BY_NAME                                    'Test%5Carray_slice'
          2        INIT_ARRAY                                       ~3      !0
          3        SEND_VAL_EX                                              ~3
          4        INIT_NS_FCALL_BY_NAME                                    'Test%5Cfunc_num_args'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    7     9        NEW                                              $7      'ReflectionFunction'
         10        SEND_VAL_EX                                              'error_reporting'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $7
    8    13        INIT_METHOD_CALL                                         !2, 'invokeArgs'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $10     
         16      > RETURN                                                   $10
    9    17*     > RETURN                                                   null

End of function test%5Cerror_reporting

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1399 KiB | 20 Q