--TEST-- func_num_args() tests --FILE-- --EXPECTF-- int(0) int(1) Warning: Missing argument 1 for test2(), called in %s on line %d int(0) int(2) int(0) Warning: Missing argument 2 for test3() in %s on line %d int(1) int(2) int(1) Warning: func_num_args(): Called from the global scope - no function context in %s on line %d int(-1) Done