Skip to content

Commit c26cff0

Browse files
committed
Fix garbled code example for PHP (id)
1 parent 0abfa5b commit c26cff0

File tree

1 file changed

+6
-1
lines changed
  • id/documentation/ruby-from-other-languages/to-ruby-from-php

1 file changed

+6
-1
lines changed

id/documentation/ruby-from-other-languages/to-ruby-from-php/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ Berikut ini adalah contoh program untuk menjumlahkan dua angka
1414
(diinputkan dari keyboard) di PHP:
1515

1616
{% highlight python %}
17-
17+
<?php
18+
$fp = fopen('php://stdin', 'r');
19+
$a = fgets($fp);
20+
$b = fgets($fp);
21+
echo $a + $b . "\n";
22+
?>
1823
{% endhighlight %}
1924

2025
Anda dapat menuliskan program tersebut di Ruby sebagai berikut:

0 commit comments

Comments
 (0)