scanf function

By Crys, 6 Years ago (2012-11-22 02:13:34), written in PHP, viewed 525 times.
URL https://paste.godclan.hu/view/uF8AzJvE Embed
Download Paste or View RawExpand paste to full width of browser
  1. <?php
  2. function scanf($format) {
  3.     $trace = debug_backtrace();
  4.     $args = $trace[0]['args'];
  5.     if (func_num_args() > 1) {
  6.         $inputs = fscanf(STDIN, $format);
  7.         for($i=0;$i<func_num_args()-1;$i++)
  8.             $args[$i+1] = $inputs[$i];
  9.     }
  10. }
  11.  
  12. scanf("%d", &$number);
  13.  
  14. echo $number;
  15. ?>

Replies to scanf function rss

Title Name When
Re: scanf function xxxy 6 Years ago.

Reply to "scanf function"

Here you can reply to the paste above