Created
August 4, 2014 13:06
-
-
Save helhum/7a9668f095c57a12f43c to your computer and use it in GitHub Desktop.
Class Alias Test
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 | |
error_reporting(E_ALL); | |
class request {} | |
class_alias('request', 'old_request'); | |
interface foo { | |
public function baz(\request $request); | |
} | |
class bar implements foo { | |
public function baz(\old_request $request) { | |
echo 'OK'; | |
} | |
} | |
$bar = new bar(); | |
$bar->baz(new request()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment