PHP Release History

DATEEVENT 1995-06-08PHP 1.0 released (as PHP/FI) 1997-11-01PHP 2.0 released (as PHP/FI 2.0) 1998-06-06PHP 3.0 released 2000-05-22PHP 4, powered by the Zend Engine 1.0, was released 2000-10-20Support for PHP 3.0 ends 2001-06-23Support for PHP 4.0 ends 2001-12-10PHP 4.1 released 2002-03-12Support for PHP 4.1 ends 2002-04-22PHP 4.2 released 2002-09-06Support for PHP 4.2 ends 2002-12-27PHP 4.3 released 2004-07-01PHP…

Random and Shuffle

<?php echo ‘Random Number between 1000-9999 : ‘. rand(1000, 9999) . ‘<br>’; echo ‘Shuffle Letters in a String (ABCDE) : ‘. str_shuffle(“ABCDE”) . ‘<br>’; echo ‘Random (10) Bytes : ‘. random_bytes(10) . ‘<br>’; echo ‘bin2hex of 10 Bytes : ‘; var_dump(bin2hex(random_bytes(10))); ?>

PHP Booleans

<?php $x=true; $y=false; if($x) echo ‘(true) returns true<br>’; if(!$y) echo ‘(false) returns false<br>’; $a=1; $b=0; if($a) echo ‘(1) returns true<br>’; if(!$b) echo ‘(0) returns false<br>’; $myString=””; if(!$myString) echo ’empty string returns false<br>’; $myNull = null; if(!$myNull) echo ‘null returns false<br>’; $myArray = array(); if(!$myArray) echo ’emptry array returns false’; $myFloat = 0.0; if (!$myFloat) echo…