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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nirazuelos at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 05:01:28 2025 UTC