Created
November 16, 2012 06:29
-
-
Save Kogarasi/4084803 to your computer and use it in GitHub Desktop.
よくわからない!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
... ここで適当に処理 | |
*/ | |
/* Case:1 意図しない挙動 */ | |
$a = current( $a ); | |
print_r( $a ); // FALSE | |
/* Case:2 こうすると動く */ | |
$b = $a; | |
$a = current( $a ); | |
print_r( $a ); // 想定した内容が返ってくる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment