Created
December 17, 2013 03:27
-
-
Save danpoltawski/7999574 to your computer and use it in GitHub Desktop.
php drives me to insanity
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
| $ cat test.php | |
| <?php | |
| // Dear php, please give me a function which will show the type of | |
| // the variable, without capturing output buffer myself.. | |
| $x = floor('1.2'); | |
| echo 'var_export:'.var_export($x, true)."\n"; | |
| echo 'print_r:'.print_r($x, true)."\n"; | |
| echo 'var_dump:'; | |
| var_dump($x); | |
| $ php test.php | |
| var_export:1 | |
| print_r:1 | |
| var_dump:double(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment