Created
March 16, 2019 05:10
-
-
Save suin/de21b09896bb8a7d60235ee4af32282e 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 PHPer { | |
public $name = '???'; | |
public $PHP力 = '???'; | |
public function PHPを教える(PHPer $教え子) { | |
$教え子->PHP力 = '強い'; | |
} | |
} | |
$hirosan = new PHPer(); | |
$hirosan->name = 'hiro'; | |
$hirosan->PHP力 = '強い'; | |
$僕 = new PHPer(); | |
$僕->name = 'suin'; | |
$僕->PHP力 = '初心者くらい'; | |
echo '<pre>'; | |
var_dump($僕); | |
$hirosan->PHPを教える($僕); | |
var_dump($僕); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment