PHP core files

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

Thanks feyd, but that's not what I meant... I know what a bitwise comparison is - I've done it so many times in school when we were working with Assembler (we did it manually... e.g we use a pen and a sheet of paper to verify things :P).

Can you show me the same code in pseudo-code?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

The code is as watered down as it can get.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

pseudo-code:

Code: Select all

function is_file(X)
{
    return IS X A FILE?;
}
:wink:

Just playing around..
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Oren wrote:I know some C, but very basic. Can you explain in words/pseudo code what these lines mean?
Judging by the code where S_IFMT used almost everywhere (presumably to cut off some unneeded bits from mode bitfield) they are just comparing mode bitfield to some predefined value. Basically it's just what astions has said.
Post Reply