LoginSignup
0
0

php7 バージョンアップに伴う変更箇所

Posted at

eregi_replace → preg_replace

split → explode

配列は初期化

Uncaught Error: [] operator not supported for strings

$arr = "";
$arr[] = $arr ;

↓OK

$arr = array();
$arr[] = $str;

関数に渡す引数が少ないとエラーが出る

エラー内容
Uncaught ArgumentCountError: Too few arguments to function test()

これまでのバージョンでは、ユーザー定義の関数に渡す引数が足りない場合は warning が発生していました。PHP 7.1 以降では、warning ではなく Error 例外が発生するようになります。 この変更はユーザー定義の関数に対してだけのもので、 内部関数には影響を及ぼしません。

→ 引数が足りない箇所を変更する。

qdmail.php

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0