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
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: noscript at uni dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC