php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46655 func_num_args(); returns nothing when inside a die
Submitted: 2008-11-23 21:12 UTC Modified: 2008-11-23 21:27 UTC
From: nirazuelos at gmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.2.6 OS: Windows Vista Ultimate 64-bit
Private report: No CVE-ID: None
 [2008-11-23 21:12 UTC] nirazuelos at gmail dot com
Description:
------------
func_num_args(); returns nothing when using inside a die.

Reproduce code:
---------------
<?php

function variableArg()
{
die(func_num_args());
}

variableArg("Arg1", "Arg2", "Arg3");


Expected result:
----------------
3


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-23 21:27 UTC] lbarnaud@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You need to cast the result of func_num_args() to a string.
See http://php.net/die
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC