Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Upgrade from PHP 4 to PHP 5 - the TRY issue

It's often the most surprising things that catch you out on language upgrades! Our new web server is running PHP 5 (5.2.6) whereas the old shared service was running PHP 4. No problem with the conversion, PHP wise, except the exchange rate page which goes to the European Central Bank's web site and reads the current rates from there. And what was the problem with that page? The Turkish currency called TRY in 3 character shorthand - which was fine in PHP 4 but has become a reserved word in PHP 5. So the code

SIT => "Slovenian Tolar",
SKK => "Slovakian Koruna",
TRL => "Old Turkish Lira (to 2004)",
TRY => "New Turkish Lira (2005)",

has become

SIT => "Slovenian Tolar",
SKK => "Slovakian Koruna",
TRL => "Old Turkish Lira (to 2004)",
"TRY" => "New Turkish Lira (2005)",

and, yes, I am aware that the Slovenian Tolar is no more and that country now uses the Euro.

The (working!) exchange rate page is here and there's also our hotel currency exchange rate page available too, both of which collect the current exchange rate from the European Central Bank's site via XML / using Web 2 technologies (more resources and publicly available source code demo) from our PHP Technology Workshop).

The picture .. we're talking Turkey, and it's the Topkapi Palace in Istanbul, taken in October 2004 on the Perl Whirl 2004 - cruising in the company of Larry Wall, Rasmus Lerdorf, Monty Widenius (Perl, PHP, MySQL) and others.





In the past, I have had a similar issue with a variable called yield in Python - since yield became a keyword. I am mindful of the same issues with say, given and when in Perl 5.10, although Perl's use of a $ in front of variable names will make these problems into very rare cases indeed - such as was the PHP try issue that I started with.
(written 2008-08-15, updated 2008-08-16)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
S159 - MySQL 5 and PHP 5
  [104] mysql_connect or mysql_pconnect in PHP? - (2004-10-30)
  [494] MySQL - a score of things to remember - (2005-11-12)
  [515] MySQL - an FAQ - (2005-12-03)
  [1131] MySQL - Password security (authentication protocol) - (2007-04-02)
  [1417] What software version do we teach? - (2007-10-31)
  [1455] Connecting to MySQL 5 from PHP on Mac OSX Leopard - (2007-12-03)
  [1766] Diagrams to show you how - Tomcat, Java, PHP - (2008-08-22)
  [2172] PHP4 v PHP5 - Object Model Difference - (2009-05-11)
  [3455] MySQL, MySQLi, PDO or something else - how best to talk to databases from PHP - (2011-09-24)

H310 - PHP - Putting it all together
  [468] Stand alone PHP programs - (2005-10-18)
  [687] Presentation, Business and Persistence layers in Perl and PHP - (2006-04-17)
  [1716] Larger applications in PHP - (2008-07-22)
  [1794] Refactoring - a PHP demo becomes a production page - (2008-09-12)
  [1840] Validating Credit Card Numbers - (2008-10-14)
  [1962] Index Card System for Game Characters in PHP - (2008-12-27)
  [2275] Debugging multipage (session based) PHP applications - (2009-07-09)
  [2635] A PHP example that lets your users edit content without HTML knowledge - (2010-02-14)
  [2931] Syncronise - software, trains, and buses. Please! - (2010-08-22)
  [3454] Your PHP website - how to factor and refactor to reduce growing pains - (2011-09-24)

G997 - Well House Consultants - Newsletter Lead Articles
  [1000] One Thousand Posts and still going strong - (2006-12-18)
  [1065] Graham Ellis - an Introduction - (2007-02-05)
  [1136] Buffering output - why it is done and issues raised in Tcl, Perl, Python and PHP - (2007-04-06)
  [1224] Object Relation Mapping (ORM) - (2007-06-09)
  [1318] Well House Manor - feature comparison against the old place! - (2007-08-24)
  [1386] New software product for warmblooded programmers - (2007-10-10)
  [1488] New trainee laptop fleet for our Open Source courses - (2007-12-30)
  [1545] Letting new visitors know we provide training courses - (2008-02-19)
  [1600] Cambidge - Tcl, Expect and Perl courses - (2008-04-04)
  [1663] Python in an afternoon - a lecture for experienced programmers - (2008-06-01)
  [1819] Calling base class constructors - (2008-10-03)
  [1912] Book now for 2009 - (2008-11-29)
  [2052] How was my web site compromised? - (2009-02-24)
  [2119] Make your business a DESTINATION business - (2009-04-05)
  [2253] Walks in and around Melksham, Wiltshire - (2009-06-21)
  [2370] C++, Python, and other training - do we use an IDE - (2009-08-21)
  [2425] Weekend and Christmas Promotion - Well House Manor Hotel, Melksham - (2009-09-26)
  [2538] Open Source Training Centre and Courses for 2010 - (2009-12-16)
  [2743] Public Open Source Training Courses running this summer and autumn in Melksham - (2010-04-27)
  [3202] Telling you something about us in just one line - (2011-03-15)


Back to
Perl v PHP, choosing the right language
Previous and next
or
Horse's mouth home
Forward to
Istanbul
Some other Articles
Lindors Hotel, near St. Briavels, Wye Valley
Preserved railways - struggling to the future?
Ever had One of THOSE mornings?
Istanbul
Upgrade from PHP 4 to PHP 5 - the TRY issue
Perl v PHP, choosing the right language
Dynamic maps / geographics in PHP
Public Training Course Dates until July 2009
Glorious (?) 12th August - what a Pe(a)rl!
Using server side and client side programming together
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1754_.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb