推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
KiseXu
V2EX  ›  Python

请问,从语言的区别看,有什么功能python能实现,php不能实现的

  •  
  •   KiseXu ·
    kisexu · May 13, 2012 · 7133 views
    This topic created in 5292 days ago, the information mentioned may be changed or developed.
    请举几个实际的例子,谢谢

    ps. 或者有没有用php实现起来很难,而用python却轻而易举的
    25 replies  •  1970-01-01 08:00:00 +08:00
    acdea4effdbb420d
    acdea4effdbb420d
    May 13, 2012
    1
    没有
    loading
    loading
    May 13, 2012
    2
    应该是没有的,以前以为php不能写GUI程序, 后来发现是自己孤陋寡闻~~~
    tioover
    tioover
    May 13, 2012
    3
    import?
    clowwindy
    clowwindy
    May 13, 2012
    4
    异步,多线程。
    jiyinyiyong
    jiyinyiyong
    May 13, 2012
    5
    听说 PHP 基本只能作为服务器端运行, 但我搜到过用做 shell 脚本的样子.. 求证实..
    kid7st
    kid7st
    May 13, 2012
    6
    Python函数式编程,PHP做不到吧.
    MayLava
    MayLava
    May 13, 2012
    7
    @jiyinyiyong 你的意思是不是php5-cli?把php当脚本来用。
    jiyinyiyong
    jiyinyiyong
    May 13, 2012
    8
    @MayLava 以前大概是直接搜 `php shell script` 看的, 应该是楼上这个了
    http://blog.johan-mares.be/ict/php/running-php-shell-scripts/
    服务端以外还有什么经常可以用 PHP 的地方吗?
    darasion
    darasion
    May 13, 2012
    9
    我们大部分情况,都是用php做多进程和脚本的。
    ayanamist
    ayanamist
    May 13, 2012
    10
    @darasion 进程之间的通信怎么处理的?
    lqs
    lqs
    May 13, 2012
    11
    从部署方式看,php每次处理完请求就把所有变量全销毁,python可以留住给下一个请求用。
    levn
    levn
    May 13, 2012
    12
    python有多继承吧
    MayLava
    MayLava
    May 13, 2012
    13
    @jiyinyiyong 木有了吧。PHP本来就是为了动态网站而生的。
    darasion
    darasion
    May 13, 2012
    14
    ayanamist
    ayanamist
    May 13, 2012
    15
    @darasion 这个和把数据放在数据库里互相沟通没有本质区别:低效!
    Tiga
    Tiga
    May 14, 2012
    16
    我来学习的。。。
    insraq
    insraq
    May 14, 2012
    17
    从非常严格的理论角度来说,答案是:没有。因为PHP和Python都是图灵完备(Turing complete)的语言,所以理论上你找不到一个Python能做到而PHP做不到的事情。所以这个问题应该问:“有什么功能Python容易实现,而PHP比较难实现。”
    dongsheng
    dongsheng
    May 14, 2012
    18
    线程啊,这个php完全没有
    10
    10
    May 14, 2012
    19
    线程,php-gtk也不成气候
    holystrike
    holystrike
    May 14, 2012
    20
    php的gui跟没有一样
    sharpblade
    sharpblade
    May 14, 2012
    21
    多了去了!
    协程、meta class、列表表达式。
    numpy一类的科学计算也没有好用的。
    自己实现一个服务器也不方便。
    reus
    reus
    May 14, 2012
    22
    http://php.net/manual/en/book.v8js.php

    如果这不算作弊的话…………嗯……
    fansgentle
    fansgentle
    May 16, 2012
    23
    科学计算
    hfcorriez
    hfcorriez
    May 24, 2012
    24
    @insraq 正解
    zhaiduo
    zhaiduo
    May 24, 2012
    25
    node.php都有了,没有什么不能。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1529 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 147ms · UTC 11:48 · PVG 19:48 · LAX 03:48 · JFK 06:48
    ♥ Do have faith in what you're doing.