SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question how to edit php source

    hi,
    I've downloaded php source which has folders like build, ext ,etc.. . Now I want to view the actual source of functions like mysql_fetch_row() etc.. Where can i find those definitions.

    Also, I'd like to edit the code and use the edited code to compile my application programs. How to do this. Thanks.

  2. #2
    SitePoint Wizard bronze trophy Kailash Badu's Avatar
    Join Date
    Nov 2005
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can edit the code with any C editor, can't you?

  3. #3
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    PHP is not a compiled language. The source code is interpreted on run-time and the source code is always available in its original state, except in those cases when it's encoded. If you can't edit the source code, it is encoded. And if it is encoded, that means the developers of the program didn't want you to edit it in first place.

  4. #4
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon View Post
    PHP is not a compiled language. The source code is interpreted on run-time and the source code is always available in its original state, except in those cases when it's encoded. If you can't edit the source code, it is encoded. And if it is encoded, that means the developers of the program didn't want you to edit it in first place.
    Sounds more like he wants to view (and edit) the PHP language source code, and not a scripts code.

    If you want to make changes to it (and somehow think this is a good idea) then all I can do is strongly discourage.

  5. #5
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Oh, indeed as I read the post second time. That's quixotic alright. Try writing your own extensions instead, that would at least make some sense.

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mysql would be in ext/mysql or ext/mysqli

    mysql_fetch_row for example is in ext/mysqli/mysqli_api.c
    Code:
    PHP_FUNCTION(mysqli_fetch_row)
    You will need to learn about php's core first
    http://devzone.zend.com/node/view/id/1021


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •