Created
June 14, 2017 13:02
-
-
Save dwightgunning/1391c2b2931f199c4f7429e00472b3fa to your computer and use it in GitHub Desktop.
Stream - PHP samples
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
// Q1 | |
<?php | |
class A { | |
public static function who() { | |
echo __CLASS__; | |
} | |
public static function test() { | |
self::who(); | |
} | |
} | |
class B extends A { | |
public static function who() { | |
echo __CLASS__; | |
} | |
} | |
B::test(); | |
?> | |
// Q2 | |
var_dump(42 == 042); | |
var_dump(‘042’ == 42); | |
var_dump(‘042’ === 42); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment