[ create a new paste ] login | about

Link: http://codepad.org/YmGAzIZs    [ raw code | output | fork ]

PHP, pasted on Jan 26:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

  $myVar = 1;

  switch (TRUE) {
    case $myVar === 1.0:
      echo "It's a float!";
      break;
    case $myVar === 1:
      echo "It's an int!";
      break;
  }


Output:
1
It's an int!


Create a new paste based on this one


Comments: