We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0abfa5b commit c26cff0Copy full SHA for c26cff0
id/documentation/ruby-from-other-languages/to-ruby-from-php/index.md
@@ -14,7 +14,12 @@ Berikut ini adalah contoh program untuk menjumlahkan dua angka
14
(diinputkan dari keyboard) di PHP:
15
16
{% highlight python %}
17
-
+<?php
18
+$fp = fopen('php://stdin', 'r');
19
+$a = fgets($fp);
20
+$b = fgets($fp);
21
+echo $a + $b . "\n";
22
+?>
23
{% endhighlight %}
24
25
Anda dapat menuliskan program tersebut di Ruby sebagai berikut:
0 commit comments