.com Solutions Inc. - Logo  
services header buttons
.
FmPro Migration bullet item 7b FmPro Upgrade bullet item 7b FmPro Development
.
.
.
. .

Email a Friend

Bookmark This Page

 

FmPro Migrator Demo Image
..

. .


 


 

 

...

.

PHP to LiveCode Conversion Service - Header graphic

FmPro Migrator Platinum Edition 7.36 Changes .irev File Output to .lc Files.

Top 10 Features

black bulletQuickly process PHP and HTML files within all subdirectories of a selected source directory.
black bulletConverted files are saved as .lc files or individual cards within a new LiveCode stack file.
black bulletSave many hours of manual retyping, performing an initial code conversion within seconds.
black bulletPHP variables are renamed, <?php tags are updated to <?lc tags, trailing semicolons and {} are removed.
black bulletSupported statements include: IF, ELSE, TRY/CATCH, PRINT, REQUIRE, SPRINT, WHILE, and FUNCTION definitions.
black bulletCommon operators and functions including: ==, ===, ++, --, &&, ||, trim(), strlen(), printf(), strtolower(), strtoupper() are remapped into LiveCode code.
black bulletPHP functions with passed in parameters are converted into LiveCode functions closed by the "end <function name>" statement.
black bulletMulti-line block HERE document code is converted into a single line LiveCode put statement.
black bulletCode indenting and comments are maintained within the generated LiveCode code.
black bulletConvert and reuse PHP code in multi-platform LiveCode projects having rich graphical interfaces deployable on desktop, server, web and mobile platforms.

 

BASIC to LiveCode Window screenshot

Description

The PHP to LiveCode Conversion Service included with FmPro Migrator Platinum Edition saves LiveCode developers many hours of tedious and error-prone work converting PHP files into LiveCode code. FmPro Migrator Platinum Edition efficiently traverses all subdirectories of any specified source directory, locating and converting all of the files it has found with the specified file extension (.php, .htm, .or html). The converted files are either saved as folders and .lc files or as individual cards within a new LiveCode stack file.

PHP to LiveCode Conversion Service Pricing

FmPro Migrator Platinum Edition includes a PHP to LiveCode License Key (Unlimited Script Quantity - 1 Year Duration)


hline image

The features and benefits of using the PHP to LiveCode Conversion Service include:

black bulletConvert and Use Existing PHP Code - The millions of dynamic PHP web applications already available for free download can provide a starting point for developing rich internet LiveCode apps using the LiveCode IDE. Efficiently converting existing PHP code into the LiveCode language can provide a way to quick-start your development process. A wealth of free PHP apps are available for managing photo galleries, guest books, email handling, forum management, mapping and much more.

black bulletHigh Performance Processing - Performing manual processing of even the most common PHP keywords for a large project could take days or even weeks of work. FmPro Migrator reduces this initial conversion phase for most projects to just a few seconds of processing time. All conversion projects will require manual work in order to reconcile differences between development environments. But using an automated process for the initial conversion phase of the project means that LiveCode developers can immediately start work on the remaining project development tasks. FmPro Migrator also provides a quick overview of the size of the conversion effort. Within a few seconds you will know how many files and lines of code are included in your entire project.

black bulletBuild Rich Internet Apps with LiveCode - Use converted PHP scripts as a starting point for creating interactive internet apps with the LiveCode development platform. Gone are the days of compromised graphical interfaces which don't look good on any operating system. And LiveCode developers can re-use the same LiveCode code for multi-platform desktop, server and mobile apps.

black bulletAn Economical Learning Tool - Are you new to the LiveCode platform? Do you have thousands of lines of PHP code scattered in dozens of different project directories? The PHP to LiveCode Conversion feature is an indispensable tool which can help you quickly get up to speed converting your existing code to the LiveCode platform.

LiveCode developed revLets provide unique marketing opportunities to showcase product functionality implemented as Web 2.0 feature rich web applications. You can paste in your own PHP code into the revLet displayed above and instantly see the results. Notice that fields are scrollable vertically and horizontally, and summary results are displayed in a normally invisible label at the lower part of the revLet window, just as you might implement within a desktop app. Images, fields, buttons and text labels are precisely positioned within the revLet, without requiring nested HTML tables or complex browser-specific CSS style sheets.

black bulletFunction Conversion - PHP Functions are converted into functions within the converted LiveCode code. The opening curly bracket is removed and the closing curly bracket is converted into an End <Function Name> keyword to complete the Function. The parenthesis surrounding the function parameters are removed and the leading $ symbol is removed from each PHP variable, along with semicolons ending each statement.

function page_header($color) {
     print '<html><head><title>Welcome to my site</title></head>';
}

function page_header($color,$title) {
     print '<html><head><title>Welcome to my site</title></head>';
}

function restaurant_check($meal, $tax, $tip) {
     $tax_amount = $meal * ($tax / 100); 
     $tip_amount = $meal * ($tip / 100);
     $total_amount = $meal + $tax_amount + $tip_amount;
     return $total_amount;
}

function page_header
 put "<html><head><title>Welcome to my site</title></head>"
end page_header

function page_header color
     put "<html><head><title>Welcome to my site</title></head>"
end page_header

function page_header color,title_
     put "<html><head><title>Welcome to my site</title></head>"
end page_header

function restaurant_check meal, tax, tip
     put meal * (tax / 100) into tax_amount
     put meal * (tip / 100) into tip_amount
     put meal + tax_amount + tip_amount into total_amount
     return total_amount
end restaurant_check

PHP Code
LiveCode Code

black bulletCode Comments and <?php Tags - Sinle-line and multi-line comments are converted into commented LiveCode code to serve as documentation. Single line and multi-line <?php tags are converted into <?lc tags. HTML code outside of the <?php tags is passed thru unchanged for use in generated .lc files. When PHP code is placed into a LiveCode stack file, the HTML code is commented out and the <?lc ?> tags are omitted, because these tags are not meaningful within the context of a LiveCode stack script.

<?php
/* We're going to add a few things to the menu:
     - Smoked Fish Soup
     - Duck with Pea Shoots
     - Shark Fin Soup
*/
print 'Smoked Fish Soup, Duck with Pea Shoots, Shark Fin Soup ';
print 'Cost: 3.25 + 9.50 + 25.00';
?>

Five plus five is:
<?php print 5 + 5; ?>
<p>
Four plus four is:
<?php
print 4 + 4;
?>
<p>
<img src="vacation.jpg" alt="My Vacation">

<?lc
/* We're going to add a few things to the menu:
     - Smoked Fish Soup
     - Duck with Pea Shoots
     - Shark Fin Soup
*/
put "Smoked Fish Soup, Duck with Pea Shoots, Shark Fin Soup "
put "Cost: 3.25 + 9.50 + 25.00"
?>

Five plus five is:
<?lc put 5 + 5 ?>
<p>
Four plus four is:
put 4 + 4
?>
<p>
<
img src="vacation.jpg" alt="My Vacation">

PHP Code
LiveCode Code

black bulletHere Document Conversion - PHP code Here document code sections are converted into LiveCode "put" statements. PHP variable names are checked with the LiveCode keywords list and if a conflict is found, the variable is renamed by adding an underscore suffix, as shown in the 2nd Here document using the $put variable. The PHP "." concatenation operator is replaced with the LiveCode "&" concatenation operator, unless it is located within double or single quotes.

<?php
print <<<HTMLBLOCK
<html>
<head><title>Menu</title></head>
<body bgcolor="#fffed9">
<h1>Dinner</h1>
<ul>
<li> Beef Chow-Fun
<li> Sauteed Pea Shoots
<li> Soy Sauce Noodles
</ul>
</body>
</html>
HTMLBLOCK

$put = <<<HERE
multiple line items here
in this block.
HERE

print "Test Info $variable1 and More info.";

print 'Test Info $variable2 and More info.';

print 'Test1 $var3 .' . "test $text2.";
?>

<?lc
put "<html>" & return & "<head><title>Menu</title></head>" & return & "<body bgcolor=" & quote & "#fffed9" & quote & ">" & return & "<h1>Dinner</h1>" & return & "<ul>" & return & " <li> Beef Chow-Fun" & return & " <li> Sauteed Pea Shoots" & return & " <li> Soy Sauce Noodles" & return & " </ul>" & return & "</body>" & return & "</html>" & return

put "multiple line items here" & return & "in this block." & return into put_

put "Test Info " & variable1 & " and More info."

put "Test Info $variable2 and More info."

put "Test1 $var3 ." & "test " & text2 & "." 
?>

PHP Code
LiveCode Code
black bulletLoop Conversion - WHILE loops are converted into the repeat/end repeat keywords used in LiveCode, while removing the opening/closing curly brackets. IF statements are converted into LiveCode if statements by replacing the opening/closing curly brackets with "then/end if" keywords. This code example also shows the replacement of the &&, ||, ++ and == operators with the equivalent LiveCode "and", "or" "add" and "=" operators.

<?php
$i = 1;
print '<select name ="people">';
while ($i <= 10) {
     print "<option>$i</option>/n";
     $i++;
     }

if (($age >= 13) && ($age < 65)
     {
     print "You are too old for a kid's discount and too young for the senior's discount.";
     }

if (($meal == 'breakfast') || ($dessert == 'souffle')) {
     print "Time to eat some eggs.";
     }
?>

<?lc
put 1 into i
put "<select name ="people">"

repeat while (i <= 10)
     
put "<option>" & i & "</option>/n"
     
add 1 to i
end repeat

if ((age >= 13) and (age < 65) then
     
put "You are too old for a kid's discount and too young for the senior's discount."end if

if ((meal = "breakfast") or (dessert = "souffle")) then
     
put "Time to eat some eggs."
end if
?>
 

PHP Code
LiveCode Code

black bulletTRY/CATCH Conversion - PHP Try/Catch keywords are directly converted into LiveCode Try/Catch code blocks.

<?php
try {
print $result[5] . "Processing Info";
print $result[0];
} catch (Exception $e) {
print 'Caught exception: ';
}

?>

<?lc
try
      put result_[5] & "Processing Info"
      put result_[0]
catch e
      put "Caught exception: "
end try
?> 

PHP Code
LiveCode Code


 

PHP to LiveCode Function & Keyword Conversions

Some functions and keywords match so closely in functionality that a simple search & replace can be done on the code to perform the conversion. Some of these conversions are listed in this table.

PHP Operator or Function LiveCode Operator or Function
-- subtract 1 from variable
-= put variable into variable
!= <>
.= put (code) after variable
*= put variable into variable * (code)
/= put variable into variable / (code)
&& and
%= put variable into variable mod (code)
++ put add 1 to variable
+= put variable into variable + (code)
|| or
=== =
== =
count()

the number of lines in the keys of () [count of array keys]
intval() trunc()
printf() put format()
strlen() length()
strtolower() toLower()
strtoupper() toUpper()
time() seconds()
trim() char 1 to -1 of ()

Demo Mode

Due to the complexity associated with any code conversion project, it is recommended that a small test project be completed prior to starting the full conversion project. By default, FmPro Migrator Platinum Edition will process 5 scripts in demo mode without requiring a license key. And the revLet located on this web page can also provide a quick test of the code conversion process. There is also additional information in the FmPro Migrator PHP to LiveCode Conversion Manual (PDF).

Requirements

Requirements:
FmPro Migrator Platinum Edition - FmPro Migrator Platinum Edition includes the PHP to LiveCode Service licence key providing unlimited usage of this feature throughout the duration of the license key.

LiveCode IDE

 

hline image

.

 

. .

.

. .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

email link

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact