Created
October 31, 2017 15:02
-
-
Save KalleZ/c7ba4f78314c989e27710e4fa14e2f3e 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 | |
class A | |
{ | |
} | |
function test_1(A[] $a) | |
{ | |
/* ... */ | |
} | |
function test_2($a) | |
{ | |
foreach($a as $tmp_obj) | |
{ | |
if(!($tmp_obj instanceof A)) | |
{ | |
throw new Exception('...'); | |
} | |
} | |
/* ... */ | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment