doubao6681 2016-10-11 02:47
浏览 56

在python语言中使用php真的是一个很好的做法吗? [关闭]

I'm a PHP Developer, i have some projects in python.

But already i done some core concepts in PHP. so is it good for reuse the those php code in python by calling via "php file.php" to return the output.

Is it's really a good practice ?

Or I should develop from scratch ?

  • 写回答

1条回答 默认 最新

  • dongzuoyue6556 2016-10-11 03:13
    关注

    No, it's something opposite from good practice. Typically you'll call something in the other language from Python script if that language is much quicker (usually C) or provides libraries for some complex analysis that'll be untrivial to reproduce in python (in my experience R, but that depends on the domain).

    PHP doesn't give you either advantage, so it's better to redo everything in Python. Your code will be easier to maintain, requiring no PHP knowledge; it'll have better architecture; you won't have a PHP (and probably some libraries thereof) as a dependency; and, most likely, it'll be quicker.

    评论

报告相同问题?

悬赏问题

  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?
  • ¥50 需求一个up主付费课程
  • ¥20 模型在y分布之外的数据上预测能力不好如何解决