Jump to content


Photo

code help


  • Please log in to reply
2 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 18 April 2006 - 01:18 AM

<?php
$bool = true;
print "Bool is set to $bool\n";
$bool = false;
print "Bool is set to ";
print (int)$bool;
?>
I was wondering about one thing in this script.
what is the (int) mean. I know bool is just a variable create which is short fo boolean, and it's set to the booleon true, here is the website it came off of the exact page actually I was just wondering if int was a preset something in php or something he named himself or what, and what it does.
[a href=\"http://www.hudzilla.org/phpbook/read.php/3_3_0\" target=\"_blank\"]http://www.hudzilla.org/phpbook/read.php/3_3_0[/a]

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 18 April 2006 - 01:29 AM

Type-casting.
~ D Kuang

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 18 April 2006 - 01:31 AM

ok so I can safetly say that (int) is the same as (integer) which is the proper usage.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users