Hi everyone,
I am writing a small menu driven program and have come across a problem i am having trouble solving. I am using Windows XP and i am developing this in the Unix Bash shell. I am trying to make it possible to exit the program from each of the five main interfaces. The code is as... (4 Replies)
hi all,
I am facing problem in shell scripting while using exit command, when ever i run a file using . ./<filename>, when i run the sae script as sh <filename> the script does not close the windows. since my script has function calls i have to use . ./ <filename>.
Could any one tell me... (8 Replies)
I'm using a while loop with an if statement. When the user choses a number, it will display a list of files. That works, the problem is q for quit won't exit script. How can I fix this? (10 Replies)
I have a script that run several subscripts. I need to find out how to do two things. First I would like to check for a file and if that file is not there I want to quit the entire script without running the rest of the script which contain subscripts. If the file is there, I want it to continue... (1 Reply)
Hey,
same problem. i want to check if files have been successfuly transferred after getting them back, but after I quit the ftp, nothing gets executed.
Difference from original post is that I get 226 and 221 feedbacks from the server.
226 Transfer complete.
2409 bytes received in 0.0086... (5 Replies)
Hi,
Here is my code to send read.txt to three servers.
col="prd167.mybank.com prd168.mybank.com bsprd169.mybank.com"
set -A look $col
for IndixList in ${look};
do
scp /tmp/read.txt admin@$IndixList:/tmp
done
This works and all the 3 servers gets the read.txt file.
However,... (8 Replies)
Hmmm.
I cannot figure out where to disable this warning message in Safari.
Google says to disable something in Safari Tabs preferences but my Macs do not have that option in Mojave.
Anyone know how to disable the following so when I quit Safari it simply quits without the "freeze the... (12 Replies)
Discussion started by: Neo
12 Replies
LEARN ABOUT PHP
intval
INTVAL(3) 1 INTVAL(3)intval - Get the integer value of a variableSYNOPSIS
int intval (mixed $var, [int $base = 10])
DESCRIPTION
Returns the integer value of $var, using the specified $base for the conversion (the default is base 10). intval(3) should not be used on
objects, as doing so will emit an E_NOTICE level error and return 1.
PARAMETERS
o $var
- The scalar value being converted to an integer
o $base
- The base for the conversion
Note
If $base is 0, the base used is determined by the format of $var:
o if string includes a "0x" (or "0X") prefix, the base is taken as 16 (hex); otherwise,
o if string starts with "0", the base is taken as 8 (octal); otherwise,
o the base is taken as 10 (decimal).
RETURN VALUES
The integer value of $var on success, or 0 on failure. Empty arrays return 0, non-empty arrays return 1.
The maximum value depends on the system. 32 bit systems have a maximum signed integer range of -2147483648 to 2147483647. So for example
on such a system, intval('1000000000000') will return 2147483647. The maximum signed integer value for 64 bit systems is
9223372036854775807.
Strings will most likely return 0 although this depends on the leftmost characters of the string. The common rules of integer casting
apply.
EXAMPLES
Example #1
intval(3) examples
The following examples are based on a 32 bit system.
<?php
echo intval(42); // 42
echo intval(4.2); // 4
echo intval('42'); // 42
echo intval('+42'); // 42
echo intval('-42'); // -42
echo intval(042); // 34
echo intval('042'); // 42
echo intval(1e10); // 1410065408
echo intval('1e10'); // 1
echo intval(0x1A); // 26
echo intval(42000000); // 42000000
echo intval(420000000000000000000); // 0
echo intval('420000000000000000000'); // 2147483647
echo intval(42, 8); // 42
echo intval('42', 8); // 34
echo intval(array()); // 0
echo intval(array('foo', 'bar')); // 1
?>
NOTES
Note
The $base parameter has no effect unless the $var parameter is a string.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | Throws E_NOTICE and returns 1, when an object is |
| | passed to $var. |
| | |
+--------+---------------------------------------------------+
SEE ALSO boolval(3), floatval(3), strval(3), settype(3), is_numeric(3), Type juggling, BCMath Arbitrary Precision Mathematics Functions.
PHP Documentation Group INTVAL(3)