Last active
August 29, 2015 14:07
-
-
Save tarunama/d771e2c73a79856ed099 to your computer and use it in GitHub Desktop.
[PHP] タイプヒンティング ref: http://qiita.com/tarunama/items/649e6722244216cf84da
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 | |
$data = array(); | |
$data[] = 'hoge'; | |
$data[] = 'foo'; | |
// この間50行くらい | |
// あ、$dataは配列なのか、と想定してコード読める | |
function typeHinting(array $data) | |
{ | |
...... | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment