php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33482 Cant give direct function return to end()
Submitted: 2005-06-26 20:10 UTC Modified: 2005-06-26 21:39 UTC
From: noscript at uni dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 5.1.0b2 OS: Windows XP
Private report: No CVE-ID: None
 [2005-06-26 20:10 UTC] noscript at uni dot de
Description:
------------
I cannot pass an direct function return to the function end();

Is it a bug or is it a feature...

Reproduce code:
---------------
$name="file.dat"
//does not work:
$end=end(explode(".", $name));

//works:
$arr=explode(".", $name);
$end=end($arr);

Expected result:
----------------
$end has value "dat"

Actual result:
--------------
Error message "only allowed to pass variables"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-26 20:27 UTC] derick@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

.
 [2005-06-26 21:39 UTC] noscript at uni dot de
but in php4 and php5 stable it works
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 02:01:31 2024 UTC