Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

KinoPHP

livebooks/kino/kino_php.livemd

KinoPHP

Mix.install([
  {:kino_php, "~> 0.2"}
])

PHP の実行

"""
php
echo 'Hello, PHP!';
"""
|> KinoPHP.eval(fn output ->
  output
  |> Kino.Text.new()
  |> Kino.render()
end)

Kino.nothing()
frame = Kino.Frame.new() |> Kino.render()

"""
\n");

  sleep(1);
}

"""
|> KinoPHP.eval(fn output ->
  KinoPHP.append_to_frame(frame, output)
end)

Kino.nothing()

Smart Cell

frame = Kino.Frame.new() |> Kino.render()
"\necho 'Hello, Livebook!';" |> KinoPHP.eval(&KinoPHP.append_to_frame(frame, &1))
Kino.nothing()