php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77409 Missing Documentation
Submitted: 2019-01-03 20:42 UTC Modified: 2019-01-03 20:49 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: colbathmark at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 7.2.13 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: colbathmark at gmail dot com
New email:
PHP Version: OS:

 

 [2019-01-03 20:42 UTC] colbathmark at gmail dot com
Description:
------------
---
From manual page: https://php.net/migration70.incompatible
---


Test script:
---------------
<?php

function  foo($a, $b, $c)
{
   return $a + $b + $c;
}

print foo(1, 2);
?>

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

Actual result:
--------------
 PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function foo...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-03 20:44 UTC] colbathmark at gmail dot com
Thing is, it's not documented in the migration 70 incompatible page. It works in PHP 5, but in PHP 7 we get a fatal error.
 [2019-01-03 20:46 UTC] peehaa@php.net
-Status: Open +Status: Not a bug
 [2019-01-03 20:46 UTC] peehaa@php.net
That has been introduced in 7.1 not 7.0:

https://secure.php.net/migration71.incompatible
 [2019-01-03 20:49 UTC] requinix@php.net
And before 7.1 it was a warning. Always had been. https://3v4l.org/k1u1Z
 [2019-01-03 21:47 UTC] colbathmark at gmail dot com
Thanks, and sorry for *bugging* you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 12:01:27 2024 UTC