Re: scanf function

From xxxy, 12 Years ago, written in PHP, viewed 1'002 times. This paste is a reply to scanf function from Crys - view diff
URL https://paste.godclan.hu/view/abRnQIJM Embed
Download Paste or View Raw
  1. <?php
  2. function scanf($format) {
  3.     $trace = debug_backtrace();
  4.     $args = $trace[0]['args'];
  5.     $argc = func_num_args();
  6.     $inputs = fscanf(STDIN, $format);
  7.         $n = count($inputs);
  8.         if($argc <= $n)
  9.         $n = $argc - 1;
  10.         for($i=0;$i<$n;$i++)
  11.         $args[$i+1] = $inputs[$i];
  12.         return $n;
  13. }
  14.  
  15. scanf("%d", &$number);
  16.  
  17. echo $number;
  18. ?>

Replies to Re: scanf function rss

Title Name Language When
Re: Re: scanf function Crys php 12 Years ago.

Reply to "Re: scanf function"

Here you can reply to the paste above