News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sudheer Satyanarayana's Blog:
Zend Date Class Constants Cheat Sheet
December 28, 2010 @ 10:04:21

Sudheer Satyanarayana has provided a handy cheat sheet for those using the Zend_Date component of the Zend Framework listing the default values of the constants it provides.

Date and time handling in general is a problem in programming. For PHP programmers, there's a good library out there that performs all the difficult tasks and provides convenient APIs. Zend_Date has several constants defined. It is good to know what each one of them represents.

You can either come back to this post if you need a reference or you can download the PDF and have it right at your fingertips.

0 comments voice your opinion now!
zenddate zendframework constants cheatsheet pdf


David Coallier's Blog:
PHP Namespaces (Part 2 Namespace constants)
August 27, 2007 @ 08:58:00

Following up from his previous post about namespaces in the upcoming PHP6 version of the language, David Coallier has posted part two, a look at namespace constants.

Hello all, welcome to that part 2 of PHP Namespace education. Again, Dmitry comes up with another patch that has been discussed a bit on the php.internals list and this patch gives us the ability to declare Namespace constants (just like a class constant).

Included is some versy simple code that defines the constant with the "const" keyword and imports it via a packaged namespace using the double-colons.

0 comments voice your opinion now!
namespace php6 constants import const package namespace php6 constants import const package


Ed Finkler's Blog:
PHPSecInfo v0.2.1 now available
April 09, 2007 @ 07:36:00

Ed Finkler has an announcement about the latest release of the PHP security audit tool, PHPSecInfo, for version 0.2.1 today.

PhpSecInfo v0.2.1 is now available. It's primarily a bugfix release, but a fairly significant one.

Updates include:

  • uid and gid tests now correctly test the user and group that PHP is executing as
  • Changed upload_max_filesize and post_max_size return 'OK' if current value is equal to recommended value
  • fixed nonstandard naming on some constants
  • fixed XHTML validation issue

0 comments voice your opinion now!
phpdecinfo release changelog test user constants xhtml fileupload phpdecinfo release changelog test user constants xhtml fileupload


WebReference.com:
The Building Blocks Data Types, Literals, Variables, and Constants - Part 2
January 22, 2007 @ 09:52:00

WebReference.com has posted part two in a series looking at the "building blocks" that make up PHP and its use. This time, it's a look at the containers for your data - the data types, literals, variables, and constants.

They go through each, explaining what they are, how they're used and when you'd want to use them in your code. They explain the data types and how those fit with each "container" and some basic things like valid names and how to assign things correctly.

They even get get into working with variables from GET and POST requests as well as working with the scope of variables and getting the metadata about them (is it an integer? is it empty?)

0 comments voice your opinion now!
building blocks datatypes literals variables constants tutorial building blocks datatypes literals variables constants tutorial


PHPBuilder.com:
BitMasks Emulate Unix Permissions in PHP (Quickly)
August 09, 2006 @ 16:01:53

Permissions in Unix-based systems have become one of the standard models for development all over the world. They're simple to learn and use while being extremely powerful at the same time. In this new article (as contributed by Eric Potvin) from PHPBuilder.com today, they bring this power to the realm of PHP with bitmasks.

Bitmasking is a very useful method to emulate Unix-style file permissions (read/write/execute for example). What's nice about a PHP implementation is that you can configure your own bitmasks and use them for any kind of permissions in your scripts and applications. The implementation is relatively simple as well.

They start by defining a few of the permission levels (add/delete/denied) in PHP constants before showing the bitMask() function you can use to check a user's permissions. They also include some simple pseudo-code to show how it's used. For more information, check out the complete article here.

1 comment voice your opinion now!
bitmask unix permissions tutorial define constants bitmask unix permissions tutorial define constants


Zend Developer Zone:
PHP Gotchas!
April 24, 2006 @ 12:49:58

The Zend Developer Zone has a new post for those out there struggling with the small stuff. You've got the language down and you're learning the syntax, but there's still a few things that elude your grasp. If this is you, check out their list of "PHP Gotchas" to see if your problem is on there.

Call them obscure, call them pointless, call them "newb mistakes." Whatever you call them, you've more than likely been tripped up at some point in your PHP coding journey by seemingly odd or illogical behaviors of the language. With PHP being a loosely-typed language, funny things are bound to happen.

PHP is an easy language to pick up for the casual coder--things should "just work." But not everyone comes into PHP development with a strong programming background, so here are some charming examples of ways PHP can trip you up if you aren't careful. Put on your thinking caps--here comes the science!

Included in their list of common problems for budding PHP developers are things like finding a "needle" in a string "haystack", working with constants, using and/or, and the __toString functionality in PHP5.

0 comments voice your opinion now!
gotchas strings constants tostring logic math gotchas strings constants tostring logic math



Community Events





Don't see your event here?
Let us know!


api install library introduction bugfix laravel code community release configure interview language podcast wordpress list developer symfony threedevsandamaybe application series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework