Error reported when uploading a reference in php5.4

Source: Internet
Author: User
Php5.3 series and earlier versions have no problem in transferring references. After php5.4 is upgraded, the system reports the error Fatalerror: Call-timepass-by-referencehasbeenremovedinF: workwampwwwtesttest. phponline6. Let's take a look at the example below. Example 1: recursive reference, in php5.3 and

In php5.3 and earlier versions, there is no problem in transferring references. After php5.4 is upgraded, the following error occurs: call-time pass-by-reference has been removed in F: \ work \ wamp \ www \ test. php on line 6. Let's take a look at the example below. Example 1: recursive reference, in php 5.3 and

There is no problem in transferring references from php5.3 series and earlier versions. After php5.4 is upgraded, an error is reported for all references.
Fatal error: Call-time pass-by-reference has been removed inF: \ work \ wamp \ www \ test. phpOn line6. Let's take a look at the example below.

Example 1: recursive reference transfer. In php 5.3 and later versions, test results

 "; $ Bb --; test ($ aa, & $ bb) ;}$ aa = 3; $ bb = 6; test ($ aa, & $ bb ); // The running result is as follows: 654?>

Php 5.4 won't work. I tested it with php 5.4.11. Fatal error: Call-time pass-by-reference has been removed in F: \ work \ wamp \ www \ test. php on line 6 is reported.

For example 2, php5.4.11, the above test, only test transfer reference

>
 "; // Test ($ aa, & $ bb) ;}$ aa = 3; $ bb = 6; test ($ aa, $ bb); // php5.4, in php5.3 and earlier versions, the input result is 5 // test ($ aa, & $ bb); // In php5.3, the input result is 5. In php5.4 and later versions, the following error occurs: call-time pass-by-reference...?>

After php5.4, you can define "&". When you call "&", an error is returned. This call is strange.

Example 3: php5.4 and recursive reference Transfer

>
 "; Test ($ aa, $ bb) ;}$ aa = 3; $ bb = 6; test ($ aa, $ bb); // php5.2, php5.3, php5.4 can be run. The running result is: 543?>

It seems that the upgrade from 5.3 to 5.4 is a bit difficult. If you do not know the change, the upgrade will be very depressing.

Add to favorites and share this article!

In php5.3 and earlier versions, there is no problem in transferring references. After php5.4 is upgraded, the following error occurs: call-time pass-by-reference has been removed in F: \ work \ wamp \ www \ test. php on line 6. Let's take a look at the example below. Example 1: recursive reference transfer. In php 5.3 and later versions, test results "; $ Bb --; test ($ aa, & $ bb) ;}$ aa = 3; $ bb = 6; test ($ aa, & $ bb ); // The running result is as follows: 654?> Php 5.4 won't work. I tested it with php 5.4.11. Fatal [...]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.