Description of isset and description of isset
Author: zhanhailiang Date:
Today I encountered a very strange bug. The test is as follows:
<? Php $ a = 'abc'; var_dump (isset ($ a ['code']); // theoretically it should be False, but it is TRUE
Check the following manual description:
Example #2 isset() on String Offsets PHP 5.4 changes how isset() behaves when passed string offsets. <?php$expected_array_got_string = 'somestring';var_dump(isset($expected_array_got_string['some_key']));var_dump(isset($expected_array_got_string[0]));var_dump(isset($expected_array_got_string['0']));var_dump(isset($expected_array_got_string[0.5]));var_dump(isset($expected_array_got_string['0.5']));var_dump(isset($expected_array_got_string['0 Mostel']));?> Output of the above example in PHP 5.3: bool(true)bool(true)bool(true)bool(true)bool(true)bool(true)Output of the above example in PHP 5.4: bool(false)bool(true)bool(true)bool(true)bool(false)bool(false)
Summary: Before using isset, it is best to use is_array/is_string to determine the variable type to avoid inconsistency in different PHP versions,In the old saying, PHP is a weak language, but the weak type does not indicate no type., As follows:
<?php $a = 'abc';var_dump(is_array($a) && isset($a['code']));
What is "a point" in "A Little Bit Of Feihong film" in Tianjing Sha Qiu?
Sunset in the village,
Cow,
A little Feihong film.
Qingshan,
White grass, red leaves, yellow flowers.
Feihong described it as "a little" and clearly described it from the perspective of vision. "a little" provided an open and profound artistic conception.
At the same time, I wrote the artistic conception of loneliness in a 'point' manner. In the sunset, the old crow was far more powerful.
Yidian' is more profound in "a little photo of Feihong .---
Pay attention to the last two statements,
White grass, red leaves, yellow flowers.
"A little Feihong shadow" is to write "Qingshan green water, white grass, red leaves, yellow flowers ". The mood suddenly changes and the flowers bloom in the spring. This alone is obviously very complex. It is not difficult to see the purpose of Feihong's film. In the desert, there is another hope for him, infinite yearning.
Therefore, I wrote my ambition, which is unknown to most people.
A better personal explanation
Self-pity that cannot be restrained. I have nothing to do with tranquility. Non-Customs love light look, cold place is preferred. It is not a rich flower in the world. Suddenly, you only want to have a hug. The world is changing. More smiles are just far-fetched.