LifeMichael

LifeMichael

Haim Michael Blog

LifeMichael RSS Feed
 
 
 
 

Posts tagged PHP

PHP Mobile Applications HIT May 2013 INFO

On June 19th I will start to deliver a detailed professional course for cross platform web and mobile applications development. The course focuses on PHP for the server side and on JavaScript for the client side. The course includes 220 academic hours and it takes place in HIT. You can find detailed information about this [...]

The list Construct in PHP PRO

The list construct in PHP allows us an easy assignment of values that belong to array into variabels in our code. The list construct is highly useful when developing code that works with a relational database. The following code sample shows a simple usage for the list construct. <?php $vec = [2=>"dave",1=>"ron",0=>"chen",3=>"ran"]; list($a,$b,$c) = $vec; [...]

The usort Function in PHP PRO

The usort function allows us to specify the criteria by which the array will be sorted. The following code sample includes the definition of the class Student and the creation of an array that its values are references for objects instantiated from Student. Using the usort function we can sort the students according to their [...]

PHP Profiling using Zend Studio PRO

Zend Studio allows us to profile the code we write in PHP using an easy to use profiler it already includes. The following video clip shows how simple it is.

The Zend Framework Zend_Locale Component PRO

Using the Zend_Locale component we can represent different locales. Each locale is a combination of a language and a country. Usually we will set the default locale of our application during the execution of our bootstrap file. Zend_Locale::setDefault(‘he_IL’); There are various possible ways for using the Zend_Locale. The following code sample creates new Zend_Locale objects [...]

Zend_Db_Table Simple Demo PRO

Using the Zend_Db_Table class, which is part of the Zend Framework, we can easily access a specific table in our database. The following code sample shows how simple it is to add a new row using this class. The following code includes our definition for the users controller. <?php require_once ROOT_DIR.’/models/Users.php’; class UsersController extends Zend_Controller_Action [...]

Simple Trait in PHP PRO

Defining a trait is very similar to defining a class. Instead of using the keyword class we use the keyword trait. The purpose of traits is to group functionality in a fine grained and consistent way. It is not possible to instantiate a trait. The trait servers as an additional capability that provides us with additional capabilities when [...]

Arrays Short Syntax in PHP 5.4 PRO

As of PHP 5.4 we can create new arrays in a simple way. Simpler than ever. The following code sample shows that. <?php $vec_a = [4,6,2,7]; $vec_b = ['a'=>'australia','b'=>'belgium','c'=>'canada']; foreach($vec_a as $k=>$v) { echo ” “.$k.”=>”.$v; } foreach($vec_b as $k=>$v) { echo ” “.$k.”=>”.$v; } ?> The following video clip shows the execution of this [...]

PHP 5.4 Short Tags PRO

As of PHP 5.4, the support for short tags exists by default. There is no need to introduce changes into php.ini in order to use the PHP short tags. <? $numA = 24; $numB = 4; ?> <h1><?=($numA+$numB)?></h1> The following video clip shows the execution of this code sample and explains it.

PHP 5.4 Access Members on Instantiation PRO

PHP 5.4 allows us to access class members on the instantiation. We will use this special capability in those rare cases in which the only reason for creating the object is in order to allow us to access one of the class members. <? class Utils { function calc($numA,$numB) { return $numA+$numB; } } $temp [...]

Facebook Page

Life Youtube

Categories

Communities


Certifications




Tags

Speaker Wiki

My Facebook

Technorati

Add to Technorati Favorites

Recommend

Archives

Countries I Visited


visited 17 states (7.55%)
Create Your Own Map!

ClustrMaps

Recent Searches

FeedJIT

Google Page Rank

Alexa Stats

Courses I Teach


 

My Free Lectures


 

 

 

My Free eBooks


 

 

 

 

 

 

 

 

 

 

 

 

 

 

Courses 1996

Courses 1997

Courses 1998

Courses 1999

Courses 2000

Courses 2001

Courses 2002

Courses 2003

Courses 2004

Courses 2005

Courses 2006

Courses 2007

Courses 2008

Courses 2009

Courses 2010

Courses 2011

Courses 2012

Courses 2013