The Difference Between PHP Echo and Print

Few other web development languages have done as much for web developers as PHP has. And in learning all the complexities of the language, web developers will be able to better become higher paid, more satisfied, and better prepared to make the next best web application. But taking baby steps in getting there is important: and the finer things such as knowing the difference between Echo and Print become clear.

Two commands are used to output text to the screen: Print and Echo. But since both do the same thing, why would there be two different commands? The answer, interestingly enough, eludes even some PHP experts.

Print is actually something more of a function, as it can be enclosed in brackets. Echo lacks this ability, but then again, there is almost never a need to do so. In reality, having this ability is something that even those who have seen it all in PHP likely won’t need to make use of. This just adds more confusion to the topic than what was previously apparent.

While performance may be a big issue for PHP developers and their clients, the debate between Print and Echo is actually fairly meaningless. It is true that Print will take more system resources to use, but it is such a minimalistic amount that developers are recommended to choose the construct of their choice, regardless of speed issues.

So far the industry standard has been to use Echo, but it should be stressed that either command may be used at will. Echo seems to be the favorite as it is easier to type, not to mention it’s a fun word to say! Those who favor the Print command are usually older programmers, who are accustomed to using the command Print from other programming languages that are now considered archaic.

As a last note of worthiness, it should be made clear that if speed is an issue, more emphasis should be put on how the two commands are used. Repeatedly using either command where a programmer could simply concatenate a string or value together will waste system performance- and on a much more noticeable scale that the difference between returning a value or not. Thus, this subject should be addressed if anything in regards to speed.

In Conclusion

PHP development just wouldn’t be the same without fun debates such as the one just mentioned. But in reality, it really doesn’t matter which route is taken- so long as either language construct is used in a performance-based manner. Although Print may still have somewhat of a following today, as books and publishers start using Echo more often, it’s likely we’ll see a death to the Print command soon enough.

Source by Brian Nostraldo

How Many Calories Do You Burn by Running?

How many calories do you burn by running?

The glib answer is 100 or 110 calories per mile for an average 155 pound runner.

But a group from Syracuse University found that 12 men who ran and walked 1600 meters (approximately 1 mile) on a treadmill, burned an average of 124 calories running and 88 walking; while 12 women who did the same workout burned 105 and 74 calories respectively. Typically women burn less because their lighter bodies require less effort to move them.

If you sat at home watching television instead of exercising, your body would still expend calories. In order to accurately determine the calories burned during an exercise session, deduct your resting rate from the calories burned.

The formula for working out net calories burned per mile while running is to multiply your body weight in pounds by.75. For example, if you weigh 160 pounds and run 2.8 miles then the net calories used would be 160 multiplied by.75 multiplied by 2.8 miles, resulting in 336 net calories burned for this workout.

Below are tables which, depending on whether you run for a length of time or at a certain speed, may be useful.

This table sets out calories burned by 140 and 195 pound people who run for one hour:

Running 5.0 miles per hour (12.0 minute mile) 508 708

Running 5.2 miles per hour (11.5 minute mile) 572 797

Running 6.0 miles per hour (10.0 minute mile) 636 885

Running 6.7 miles per hour (9.0 minute mile) 699 974

Running 7.0 miles per hour (8.5 minute mile) 731 1018

Running 7.5 miles per hour (8.0 minute mile) 795 1107

Running 8.0 miles per hour (7.5 minute mile) 858 1195

Running 8.6 miles per hour (7.0 minute mile) 890 1239

Running 9.0 miles per hour (6.5 minute mile) 953 1328

Running 10 miles per hour (6.0 minute mile) 1017 1416

Running 10.9 miles per hour (5.5 minute mile) 1144 1594

Running up stairs 953 1328

Jogging 445 620

Based on this schedule, if you run for a portion of an hour, multiply your calories by the number of minutes you run and divide by 60. For example if you weigh 140 pounds and run 5 miles per hour, after 25 minutes, you burn 508 multiplied by 25 divided by 60, equalling 211 calories. If the same person ran at the same speed for 1 hour 16 minutes (76 minutes) then 508 multiplied by 76 divided by 60 equals 643 calories.

Below is a weight- and speed-adjusted table detailing the calories burned for 10 minutes of running (if the alignment goes awry, I apologise and suggest pasting it into a spreadsheet):

pounds 12 10 9 8 7 6 5:30 minutes per mile

110 66 83 91 103 116 132 149

120 72 90 100 113 127 144 162

130 78 98 108 122 137 156 176

140 85 106 117 133 149 170 191

150 90 113 124 141 158 180 203

160 97 121 133 152 170 194 218

170 102 128 141 160 179 204 230

180 109 136 150 170 191 218 245

190 115 143 157 178 200 230 257

200 121 151 166 189 212 242 272

To convert miles to kilometers, multiply them by 1.609344. For example, 2.8 miles multiplied by 1.609344 equals 4.5 kilometers.

To convert kilometers to miles, multiply them by 0.621371192. For example, 5.7 kilometers multiplied by 0.621371192 equals 3.5 miles.

To convert pounds to kilograms, multiply them by 0.45359237. For example, 150 pounds multiplied by 0.45359237 equals 68 kilograms.

To convert kilograms to pounds, multiply them by 2.20462262. For example, 59 kilograms multiplied by 2.20462262 equals 130 pounds.

Although not reflected in terms of calories burned in these tables, slow running is more exhausting than a natural, flowing stride.

To work out how long it takes to burn 1 pound of body fat, with 1 pound of fat being equal to 3500 calories, divide your weight in pounds by 50, multiply by 4, then divide into 3500. The result tells you for how many minutes you need to run at 6 miles per hour in order to burn 1 pound of body fat.

For example, if you weigh 244 pounds, 244 divided by 50 equals 4.88; 4.88 multiplied by 4 equals 19.52; 3500 divided by 19.52 equals 179 minutes; 179 minutes divided by 7 days per week equals 26. This means if you ran 26 minutes every day of the week, you would lose approximately 1 pound of body fat a week. If you ran every second day, each session needs to be 51 minutes long (179 minutes divided by 3.5 days).

Although the more you run, the more efficient your body becomes and the less calories you burn, running undoubtedly gives you a more intense workout and sheds pounds in less time than for example, walking.

Besides increasing your pulse rate, another benefit of vigorous exercise is your body continues burning calories AFTER your session ends. For example, after a 20 minute high intensity workout, your body burns the same amount of energy at half intensity for an additional 40 minutes and is called the ‘afterburn’.

If your weight loss efforts have reached a plateau or you simply wish to step up the intensity, incorporating interval training (sprinting for a short stretch of time or distance) into your running routine will accelerate results. Burning even more calories in less time, speed work also increases your muscle mass and resting metabolism so you use more calories even when not exercising.

Regardless of what exercise you do, your goal is most likely to boost your metabolism, increase the calories burned and improve your fitness level. After intense exercise your heart rate remains elevated for longer and takes more time to recover than after a sedate stroll. Having said that, a sedate stroll may be more appropriate for an unfit person and is far better than doing no exercise at all.

Source by Sharon Dell