Pramod T P

Search
Skip to content
  • Home
  • PHP
  • WordPress
  • Linux
  • Magento
  • My SQL
  • Profile
  • comments

Daily Archives: May 23, 2012

PHP

pack()

May 23, 2012 Pramod T P

It packs data into a binary string

Example

<?php
echo pack(“C8”,80,72,80,67,79,68,69,83);
?>

Output

PHPCODES

FunctionsmiscMiscellaneousPHP
PHP

ignore_user_abort()

May 23, 2012 Pramod T P

It sets whether a remote client can abort the running of a script

Example

<?php
ignore_user_abort(true);
?>

FunctionsmiscMiscellaneousPHP
PHP

highlight_string()

May 23, 2012 Pramod T P

It outputs a string with the PHP syntax highlighted

Example

<?php
highlight_string(“<?php echo ‘phpcode’ ?>”);
?>

FunctionsmiscMiscellaneousPHP
PHP

highlight_file()

May 23, 2012 Pramod T P

It outputs a file with the PHP syntax highlighted

Example

<?php
highlight_file(“index.php”);
?>

FunctionsmiscMiscellaneousPHP
PHP

__halt_compiler()

May 23, 2012 Pramod T P

It halts the compiler execution

Example

<?php
__halt_compiler();
?>

FunctionsmiscMiscellaneousPHP
PHP

get_browser()

May 23, 2012 Pramod T P

It returns the capabilities of the user’s browser

Example

<?php
echo “<pre>”;
print_r( get_browser(null,true));
?>

FunctionsmiscMiscellaneousPHP
PHP

exit()

May 23, 2012 Pramod T P

It output a message and terminate the current script

Example

<?php
$fp = fopen($site,”r”) or exit(“Failed”);
?>

Output

phpcode

FunctionsmiscMiscellaneousPHP
PHP

eval()

May 23, 2012 Pramod T P

It evaluates a string as PHP code.

Example

<?php
$lan = “phpcode”;
$text = ‘$lan’;
eval(“$value = “$text”;”);
echo $value;
?>

Output

phpcode

FunctionsmiscMiscellaneousPHP
PHP

die()

May 23, 2012 Pramod T P

Its an  alias of the exit() and prints a message and exits the current script

Example

<?php
$fp  =   fopen(“test.xml”,”r”) or die(“Failed”);
?>

FunctionsmiscMiscellaneousPHP
PHP

defined()

May 23, 2012 Pramod T P

It checks whether a given named constant exists

Example

<?php
echo defined(“LAN”)?LAN:”Not defined”;
?>

Output

Not defined

FunctionsmiscMiscellaneousPHP

Posts navigation

← Previous 1 2 3 … 7 Next →

Zend | Magento Certified PHP | eCommerce Architect

For Latest Updates
Visit phpcodez.com

Categories

Recent Posts

  • Regular expression
  • preg_match
  • Redirect root domain to a subdomain .htaccess
  • Redirect root domain to a subfolder .htaccess
  • Force SSL htaccess
May 2012
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Apr   Jun »

Recent Comments

togel online's avatartogel online on How to terminate the current s…
business funding's avatarbusiness funding on compare two strings – ja…
unsecured loans uk's avatarunsecured loans uk on Function to add an element int…
treating back pain's avatartreating back pain on Submit HTML form to pop up pag…
Pura Cleanse's avatarPura Cleanse on Add the block "Based on y…
  • RSS - Posts
Create a free website or blog at WordPress.com.
Pramod T P
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Pramod T P
    • Already have a WordPress.com account? Log in now.
    • Pramod T P
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...