1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-20 01:57:09 +03:00
mal/php
2016-10-26 08:56:57 +08:00
..
tests Tests: move step5 non-TCO tests to per impl. 2016-03-14 23:39:21 -05:00
core.php php: add seq and string? 2016-02-15 22:38:38 -06:00
Dockerfile Travis: add java, php, ps. 2015-10-05 23:31:05 -05:00
env.php All: add keywords. 2015-01-09 16:16:50 -06:00
Makefile Dist/packaging for most impls. erlang, racket *ARGV* fixes. 2016-02-24 00:45:40 -06:00
printer.php All: fix read/print of \\, and \n 2015-10-30 22:05:49 -05:00
reader.php All: fix read/print of \\, and \n 2015-10-30 22:05:49 -05:00
readline.php Allow web exec of a .mal file via symlinked php script. 2016-10-25 10:35:14 +08:00
README.md Documentation for the web-run functionality. 2016-10-26 08:56:57 +08:00
run Refactor to use run scripts, remove *_RUNSTEP 2016-05-18 22:29:18 -07:00
step0_repl.php All step0: add test, fix bugs, remove step0 eval. 2015-03-07 09:04:07 -06:00
step1_read_print.php All step0: add test, fix bugs, remove step0 eval. 2015-03-07 09:04:07 -06:00
step2_eval.php Fix empty list eval in step2 for most languages. 2016-04-02 18:40:49 -05:00
step3_env.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step4_if_fn_do.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step5_tco.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step6_file.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step7_quote.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step8_macros.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
step9_try.php php: Fix exception on literal empty list 2016-03-30 08:56:24 -04:00
stepA_mal.php Allow web exec of a .mal file via symlinked php script. 2016-10-25 10:35:14 +08:00
types.php php: add seq and string? 2016-02-15 22:38:38 -06:00

Running .mal scripts on PHP hosting

Create a symlink to mal.php with the same name as your .mal script and your script will be executed as if it was PHP.

Here's an example using local dev:

cd php
make mal.php
echo '(prn "Hello world!")' > myscript.mal
ln -s mal.php myscript.php
php -S 0.0.0.0:8000

Then browse to http://localhost:8000/myscript.php and you should see "Hello world!" in your browser as myscript.mal is run.

You can do the same thing on live PHP web hosting by copying mal.php up and creating a symlink for each .mal file you want to be web-executable.