Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ctype_digit - strange behaviour
  2. array_push($pos1, 100);
  3.        
  4. echo ctype_digit($pos1[12])." - ".ctype_digit($pos1[13]);
  5.        
  6. Array ( [0] => 0
  7.         [1] => 1
  8.         [2] => 2
  9.         [3] => 3
  10.         [4] => 4
  11.         [5] => 5
  12.         [6] => 6
  13.         [7] => 7
  14.         [8] => 8
  15.         [9] => 9
  16.         [10] => 10
  17.         [11] => 11
  18.         [12] => 12
  19.         [13] => 100 )
  20.        
  21. echo ctype_digit((string) $pos1[12])." - ".ctype_digit((string) $pos1[13]); // "1 - 1"
  22.        
  23. echo true; // "1"
  24. echo false; // ""