douren6874 2011-02-07 18:57
浏览 34
已采纳

PHP类源代码

I'm on the stage of learning OOP with the help of PHP and David Powers book (PHP Object Oriented Solutions). I'm on the chapter 3, where he talks about using DateTime class. I'll like to see the implementation of the DateTime class in order to underatnd how OOP realy works.

1) Where/how can I find the source code of DateTime class?

2) For a beginner is useful to see the code source of such classes, or is better to stay away from the messy things at this level?

  • 写回答

3条回答 默认 最新

  • douchuanghan1344 2011-02-07 19:14
    关注

    Don't bother trying to look at the code for the built-in PHP classes; they're not written in PHP (they're in C), so it won't teach you anything about writing PHP. The code is available if you want it, but is only going to be useful if you already know C)

    However there are lots of good example classes available. The PEAR repository contains loads of PHP classes which can be good for learning. You might also want to download some of the examples in the appropriately named PHPClasses.org.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题