Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by duncanb7
at 2024-07-11 01:08:53
Point:500 Replies:11 POST_ID:828568USER_ID:11059
Topic:
PHP Scripting Language;C++ Programming Language;C Programming Language
I seek a php converter to exe code compile and found an free developement software
in google seach, bamcomplie at http://www.bambalam.se/bamcompile/
Did you use it before ?
I try make a test.php just simple echo out something and
complie it at my window C, the complilation is successful and
generate a test.exe. But when I run test.exe at command line.
It is no any response, Why the bamcompile is not working just simple test.phg ?Please advise.
And if also possible, do you have any converter for php to C/C++ code?
Please advise
Duncan
in google seach, bamcomplie at http://www.bambalam.se/bamcompile/
Did you use it before ?
I try make a test.php just simple echo out something and
complie it at my window C, the complilation is successful and
generate a test.exe. But when I run test.exe at command line.
It is no any response, Why the bamcompile is not working just simple test.phg ?Please advise.
And if also possible, do you have any converter for php to C/C++ code?
Please advise
Duncan
//---------test.php------------<?php//Benck Mark Testing on winbinder and bamcompileecho "This is first test";?> 1:2:3:4:5:6:7:
Author: duncanb7 replied at 2024-07-19 22:32:35
Thanks for your reply. It is good starting
Duncan
Duncan
Accepted Solution
Expert: hmccurdy replied at 2024-07-13 12:16:36
84 points EXCELLENT
Thanks ambience. Looks interesting.
Assisted Solution
Expert: ambience replied at 2024-07-13 04:09:57
84 points EXCELLENT
You might want to check out HipHop for PHP: http://www.hiphop-for-php.com/wiki/Main_Page
Thats the technology that powers Facebook and makes it scalable. It was developed by FB. HipHop, though, is not the only PHP2C convertor and you may find one that is more suited to your working environment.
Thats the technology that powers Facebook and makes it scalable. It was developed by FB. HipHop, though, is not the only PHP2C convertor and you may find one that is more suited to your working environment.
Assisted Solution
Expert: Slick812 replied at 2024-07-12 17:32:45
83 points EXCELLENT
greetings duncanb7, , PHP is not really a type of coding language that can be mechanically converted to a compiled executable language and then have successful results on anything that is not very simple (IMHO). PHP uses server WEB tech as it's foundation, and this is NOT a windows program tech foundation. . . . I found it curious that you said bamcomplie will produce a windows executable, so I went to their web site and read some of it, although it does produce an executable, the purpose of this seems to have PHP bytecode distributed for other people to use on their PHP server, and you deliver this as a windows executable (in order to protect and hide your PHP script files code in php bytecode), , as they pointedly say =
"so it's a perfect solution if you want to distribute your application while protecting your source code"
I did not see any thing about running the executable as a functioning executable with user input and output, I think it just unpacks the bytecode as a command line, like an UNZIP program would decompress a zip archive, but I may be wrong, I also went to the Turck MMCache Encode library which does the php bytecode conversion, and there is no way this will run as an executable in windows. And this is terribly out of DATE.
You may need to get a university student to convert your code for you, or actually pay someone to do it.
"so it's a perfect solution if you want to distribute your application while protecting your source code"
I did not see any thing about running the executable as a functioning executable with user input and output, I think it just unpacks the bytecode as a command line, like an UNZIP program would decompress a zip archive, but I may be wrong, I also went to the Turck MMCache Encode library which does the php bytecode conversion, and there is no way this will run as an executable in windows. And this is terribly out of DATE.
You may need to get a university student to convert your code for you, or actually pay someone to do it.
Assisted Solution
Expert: hmccurdy replied at 2024-07-12 16:34:43
83 points EXCELLENT
I've been thinking about this problem further and noticed you didn't answer my question about the users. If the users are the general public, many of them will object to a website trying to install an executable because it could contain just about anything. If you are the user, you can trust yourself but I wonder if you are really going to fix the bottle neck by downloading data to the client. You could be trading a calculation bottleneck for an I/O bottleneck.
When doing optimization, it's important to remember the 80/20 rule (or the 90/10) rule. 80% of your program won't benefit from optimization. (It won't help to convert it from PHP to C).
The best solution might be to keep most of the PHP code except for the part that does the calculation. Pass that off to a C program using PHP's exec() function.
Having said all that, this isn't going to help much unless the C code is written efficiently (optimized for speed). Chances of someone writing a PHP->C converter that automatically does such optimization well is probably really small. That section of the program should be written, almost from scratch, in C.
Usually the most important part of this process is selecting an effecient algorithm.
When doing optimization, it's important to remember the 80/20 rule (or the 90/10) rule. 80% of your program won't benefit from optimization. (It won't help to convert it from PHP to C).
The best solution might be to keep most of the PHP code except for the part that does the calculation. Pass that off to a C program using PHP's exec() function.
Having said all that, this isn't going to help much unless the C code is written efficiently (optimized for speed). Chances of someone writing a PHP->C converter that automatically does such optimization well is probably really small. That section of the program should be written, almost from scratch, in C.
Usually the most important part of this process is selecting an effecient algorithm.
Expert: hmccurdy replied at 2024-07-11 05:50:58
I don't know of a working PHP to C converter. If there was such a thing that worked, I think it would be famous.
I suspect there are other ways to solve the problem if I can get more information. (I have two suggestions but only one makes sense and they aren't trivial to explain.)
I suspect there are other ways to solve the problem if I can get more information. (I have two suggestions but only one makes sense and they aren't trivial to explain.)
Author: duncanb7 replied at 2024-07-11 04:31:18
Just table extract from website and do some math calucation such as matrix.
Any suggestion converter from php to C.
I have tried a lot of such converter in google but none of them is working
to pass its output by cl.exe
Any suggestion converter from php to C.
I have tried a lot of such converter in google but none of them is working
to pass its output by cl.exe
Assisted Solution
Expert: hmccurdy replied at 2024-07-11 04:16:11
83 points EXCELLENT
I need to know more about this project before I can offer useful advice.
Do the people who will download the executable file in a closed group where they trust you and all run in Windows? (For instance, if this is just for yourself, then you can easily trust yourself and guarantee you run in Windows). In any event, who are your clients?
My advice forks dramatically based on your answer.
Do the people who will download the executable file in a closed group where they trust you and all run in Windows? (For instance, if this is just for yourself, then you can easily trust yourself and guarantee you run in Windows). In any event, who are your clients?
My advice forks dramatically based on your answer.
Author: duncanb7 replied at 2024-07-11 01:25:03
I suppose Client's window doesn't have any software such as VIsual Stuido, Net,
For not updated Client, exe running is good for all
For not updated Client, exe running is good for all
Author: duncanb7 replied at 2024-07-11 01:22:40
Because client will sumbit php request for examp, at www.mysite.com/php/test.php in browser
if the test.php is a huge mathmatical calculation , it cost, for example, 2 minutes, that
will be issue. So I try to think convert it all my php cod e to C and compile it into exe.
And client before run my application, need to donwload test.exe into home WIndow and
run it at PC instead of dragging into my server time that will help to
speed up the application for client. Exe running will be much faster on PC rather
than PHP code at my server
if the test.php is a huge mathmatical calculation , it cost, for example, 2 minutes, that
will be issue. So I try to think convert it all my php cod e to C and compile it into exe.
And client before run my application, need to donwload test.exe into home WIndow and
run it at PC instead of dragging into my server time that will help to
speed up the application for client. Exe running will be much faster on PC rather
than PHP code at my server
Assisted Solution
Expert: Slimshaneey replied at 2024-07-11 01:13:21
83 points EXCELLENT
What is the specific need to convert PHP to exe? PHP can work perfectly fine as a CLI script language, and indeed I use it extensively to perform various office maintenance tasks. Windows and Linux can both then execute the same (as long as folder locations are treated properly from beginning) scripts. I used to code quote a lot of exes in .Net but scripting makes more sense for me now as its far far easier to maintain.