What happens when haXe compiles to PHP?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What happens when haXe compiles to PHP?

Eric Vernon
Hi guys!

First I'd like to say thanks for the excellent help you all have been thus far.  You've convinced me to try haXe, and helped me to install it on my system.  I do have one question, however.  When I compile a simple hello world script (as seen on the "Getting Started with haXe / PHP page") it creates about a dozen PHP files.  This is very confusing!  It took me about 10 minuts of just following includes and class declarations to figure out what all was going on.  If I were to create multiple hx files (something I can't seem to do, I get an error saying "Invalid class hello") and compile them all... will these 10 files be created for each of them, or will they be shared?  Also, when I just want to upload changes to a web directory... will I have to upload all of these files?

Thanks again!
Eric

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: What happens when haXe compiles to PHP?

Gustavs
I haven't used the PHP target, but the files you're talking about are
probably the haXe standard files. They're the classes shared by all
platforms so they just wrap the PHP functionality. So they're shared
and they don't change. 'hello' is an invalid class because it starts
lowercase.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: What happens when haXe compiles to PHP?

Franco Ponticelli
Hello Eric,

I have added a tutorial to explain what happens. You can find it here: http://www.haxe.org/doc/php/dissecting_hello_world?lang=en

I hope it will answer all of your questions. I've written it in the hurry so don't be surprised if you find some errors and feel free to correct them ;-)

Franco.

On Wed, Oct 22, 2008 at 10:16 AM, Gust <[hidden email]> wrote:
I haven't used the PHP target, but the files you're talking about are
probably the haXe standard files. They're the classes shared by all
platforms so they just wrap the PHP functionality. So they're shared
and they don't change. 'hello' is an invalid class because it starts
lowercase.

--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org