1

I'm pretty new to Swift and I'm trying to create an GUI application that parses PHP code and return the output (for study purpose).

In other words, what I'm trying to ask is: how to reach PHP from Swift? I have a snippet and I want to get the resulting output, but I'm inside an OSX application.

My first idea was to "bundle" PHP in my app, but I really don't have a clue on how (or even if it's possible) to do that.

I'm also thinking on taking the code and sending it to the shell and just wait for the response.

Well, any thoughts?

Thank you very much!

8
  • This is too generic of a question. SO should be used to ask questions when you have initially written something and found a stumbling block. Not ask how to do an entire project. On the flip side, you can't bundle PHP in an app. If you thinking sending the code to a server and waiting for a response is something you can do, try it out since you are doing things for study purposes. Once you find a blocker ask a new question! Commented Dec 14, 2015 at 18:46
  • You want to interpret PHP code in Swift? Why? Just run PHP on a server and HTTP? Commented Dec 14, 2015 at 18:46
  • Actually this is a very small project. Just a text editor that runs the PHP code, so the question is kind of "the full project" because there is no other stuff to do within it. Commented Dec 14, 2015 at 18:47
  • I want to run because I'm trying to develop an app for OSX to get a PHP snippet and show the resulting output without opening the terminal. Commented Dec 14, 2015 at 18:49
  • stackoverflow.com/questions/10866301/… This might be of use for you Commented Dec 14, 2015 at 18:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.