PHP applications usually use HTML and JavaScript client-side technologies to render their user-interfaces. Since Flex is rendered in the browser and can integrate easily with PHP on the server-side, it is a perfect choice for more dynamic UI interfaces for PHP.
PHP is an interpreted scripting language that allows a web server to create dynamic web pages or web services. It is a back-end server technology.
You use PHP to generate HTML programmatically before it is sent by the web server to a requesting client browser.
PHP is also used to process form data sent from a client browser.
The web server invokes the PHP interpreter only when a URL is requested. All program state is lost between requests without special programming.
A dynamic web application written in PHP consists of a number of .php files on the host server, which are created by a developer with a text editor or IDE.
PHP can talk directly to a database server such as MySQL.
Because PHP creates HTML, intimate knowledge of HTML coding is also required for professional results.
Implementing event-driven user-interfaces and animation effects requires use of JavaScript and HTML.
How does it compare to Flex?
With PHP, both application logic and layout execute on the server, which returns HTML to the browser. With Flex, a SWF file embedded in the web page executes on the client machine.
The GUI of a PHP application is generated HTML and optionally supporting JavaScript.
All the advantages and limitations of HTML-based design apply to a PHP-based application. Flex is generally not limited by HTML layout constraints.
PHP can talk directly with a database server, and therefore can be used to write web services. Flex does not communicate with the database directly; however, it can consume data from a web service and display it.