Last active
January 15, 2016 05:17
-
-
Save DQNEO/54ce889746a0a7dfd0fe to your computer and use it in GitHub Desktop.
We can use keywords as method names, on PHP7
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 | |
<?php | |
class MyClass | |
{ | |
public function list() | |
{ | |
echo "list\n"; | |
} | |
public function echo() | |
{ | |
echo "echo\n"; | |
} | |
} | |
echo PHP_VERSION . PHP_EOL; | |
$obj = new MyClass; | |
$obj->list(); | |
$obj->echo(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHP 7.0.2 (cli) (built: Jan 6 2016 14:39:28) ( NTS )
result
PHP 5.6.16 (cli) (built: Nov 26 2015 08:01:30)
result