RE: [PHP-DEV] PHP on WinCE
| From: | Joseph Tate | Date: | Wed, 19 Jun 2002 15:52:37 +0000 |
| Subject: | RE: [PHP-DEV] PHP on WinCE | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-85373@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Wez Furlong [mailto:wez@thebrainroom.com]
> Sent: Wednesday, June 19, 2002 11:21 AM
> To: Peter Petermann
> Cc: Wez Furlong; php-dev@lists.php.net
> Subject: Re: [PHP-DEV] PHP on WinCE
>
> I've a feeling that porting to CE will be pretty much a case of adding
> a new build target to the existing PHP-Win32 source and compiling, with
> the odd #ifdef here and there. That sounds really nice in comparision
> to the idea of writing from scratch in C.
Bzz. Wrong. Remember Wince is 16 bit character oriented. Win32 is 8 bit
character oriented. Every System call that is made would need to be
changed. It's not a big deal if CString is your basic string unit, but
otherwise every API call requires a call to MultiByteToWideChar for each
char * passed to it (although there shouldn't be many of those in the
source). Add to it the incomplete stdlib implementation (which will
probably be a problem) and you've got yourself one big pain in the neck. I
ported metakit (www.equi4.com/metakit) which isn't as involved as PHP, but
it still took me a long time. I'm not saying it can't be done, just that I
wouldn't attempt it. First of all, any interpreted language is going to
require a memory hit to load the interpreter before even beginning to run
the program. Secondly, since your PDA only runs at 206 MHz or less, and you
only have 8-64 MB of memory anyway, much of it used up by the other crap on
the device, I would never write anything but C/C++ for CE. C++ is slow
enough as it is. Microsoft hasn't even got VB right. It's your time and
energy though. Of course I think it would be pretty cool to have PHP on
Windows CE. I know Sascha or someone was talking about an embedded PHP
version a couple of months ago.
> Porting to other PDA OS's might be a bit more work, in terms of the
> build system, but that's not on the cards just yet.
Palm is much nicer to program for, except for the gui. You only have a
33MHz processor to work with though (well, until now that is).
Joseph