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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC