In today's world, XHP has become a topic of great relevance and interest to a wide variety of people. Whether due to its impact on society, its historical relevance, its importance in the scientific field or its influence on popular culture, XHP has captured the attention of millions around the world. This article seeks to thoroughly explore all aspects related to XHP, analyzing its impact in different areas and offering a comprehensive and in-depth vision of this fascinating topic. From its origins to its current relevance, this article aims to provide a complete and detailed perspective on XHP, offering readers a broader and richer understanding of this phenomenon.
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
|
Original author(s) | Marcel Laverdet |
---|---|
Developer(s) | Meta Platforms |
Initial release | February 2010 |
Stable release | |
Repository | |
Written in | PHP, Hack |
Platform | Cross-platform |
Type | PHP Library |
License | before version 2.6: BSD License, Starting from version 2.6: MIT License |
Website | hhvm |
XHP is an augmentation of PHP and Hack developed at Meta (formerly known as Facebook) to allow XML syntax for the purpose of creating custom and reusable HTML elements. It is available as an open-source software GitHub project and as a Homebrew module for PHP 5.3, 5.4, and 5.5. Meta also developed a similar augmentation for JavaScript, named JSX.
XHP was loosely inspired by ECMAScript for XML and created by Marcel Laverdet. It was first developed for Facebook Lite as a new UI rendering layer but was later ported over to Facebook's www and mobile web stack as well as incorporated into HipHop for PHP. It was made available to the public in February 2010 and until 2020 accounted for nearly all of Facebook app's server-side generated HTML.[citation needed]
In 2020, Facebook redesigned its primary web app to run mostly on React components, rendered both server and client-side. XHP is still used in parts of Facebook but is a legacy technology now being phased out.
XHP offers a much cleaner interface to UI programming when outputting HTML in PHP, but has some engineering advantages as well.
setAttribute()
, getAttribute()
, appendChild()
, and several others prior to or during render.