Created
January 2, 2015 15:59
-
-
Save dinks/16198141c673c1a6d391 to your computer and use it in GitHub Desktop.
wat in php
This file contains hidden or 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
// '0', 0, and 0.0 are false, but '0.0' is true | |
// If a function returns an Array, you just can not write | |
$first_element = function_returns_array()[0]; //Syntax ERROR!! | |
$first_element = ( function_returns_array() )[0]; //This neither!! | |
//Instead you must write | |
$a = function_returns_array(); | |
$first_element = $a[0]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment