python有交互环境,运行效果如下:[root@localhost ~]# python
Python 2.7.5 (default, Nov 20 2015, 02:00:19)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
但是php本身是没有的,不过可以安装psysh,运行效果如下:[root@localhost ~]# ./psysh
Psy Shell v0.9.9 (PHP 7.2.10 — cli) by Justin Hileman
>>> strtotime('78988684237f7211')
=> 165410359200
>>> date('Ymd',165410359200)
=> "72110824"
>>> date('Y-m-d',165410359200)
=> "7211-08-24"
>>>
PsySH安装方式一:wget https://psysh.org/psysh
chmod +x psysh
./psysh
PsySH安装方式二:composer g require psy/psysh:@stable
psysh