PHP hook, building hooks in your application
Introduction
One of the real challenges in building any type of framework, core or application is making it possible for the developers to hook into the business logic at specific points. Since PHP is not event based, nor it works with interrupts you have to come up an alternative.
The test case
Lets assume we are the main developers of a webshop framework. Programmers can use our framework to build complete webshops. Programmers can manage the orders that are placed on the webshop with the order class. The order class is part of our framework and we don’t want it to be extended by any programmer. However we don’t want to limit to programmers in their possibilities to hook into the orders process.
For example programmers should be able to send an email to the webshopowner if an order changes from one specific delivery status to another. This functionality is not part of the default behavior in our framework and is custom for the progammers webshop implementation.
Like said before, PHP doesn’t provide interrupts or real events so we need to come up with another way to implement hooks into our application. Lets take a look at the observer pattern.
Implementing the Observer pattern
The observer pattern is a design-pattern that describes a way for objects to be notified to specific state-changes in objects of the application.
For the first implementation we can use SPL. The SPL provides in two simple objects:
SPLSubject
- attach (new observer to attach)
- detach (existing observer to detach)
- notify (notify all observers)
SPLObserver
- update (Called from the subject (i.e. when it’s value has changed).
iOrderRef = $iOrderRef;
// Get order information from the database or an other resources
$this->iStatus = Order::STATUS_SHIPPED;
}
/**
* Attach an observer
*
* @param SplObserver $oObserver
* @return void
*/
public function attach(SplObserver $oObserver)
{
$sHash = spl_object_hash($oObserver);
if (isset($this->aObservers[$sHash])) {
throw new Exception('Observer is already attached');
}
$this->aObservers[$sHash] = $oObserver;
}
/**
* Detach observer
*
* @param SplObserver $oObserver
* @return void
*/
public function detach(SplObserver $oObserver)
{
$sHash = spl_object_hash($oObserver);
if (!isset($this->aObservers[$sHash])) {
throw new Exception('Observer not attached');
}
unset($this->aObservers[$sHash]);
}
/**
* Notify the attached observers
*
* @param string $sEvent, name of the event
* @param mixed $mData, optional data that is not directly available for the observers
* @return void
*/
public function notify()
{
foreach ($this->aObservers as $oObserver) {
try {
$oObserver->update($this);
} catch(Exception $e) {
}
}
}
/**
* Add an order
*
* @param array $aOrder
* @return void
*/
public function delete()
{
$this->notify();
}
/**
* Return the order reference number
*
* @return int
*/
public function getRef()
{
return $this->iOrderRef;
}
/**
* Return the current order status
*
* @return int
*/
public function getStatus()
{
return $this->iStatus;
}
/**
* Update the order status
*/
public function updateStatus($iStatus)
{
$this->notify();
// ...
$this->iStatus = $iStatus;
// ...
$this->notify();
}
}
/**
* Order status handler, observer that sends an email to secretary
* if the status of an order changes from shipped to delivered, so the
* secratary can make a phone call to our customer to ask for his opinion about the service
*
* @package Shop
*/
class OrderStatusHandler implements SplObserver
{
/**
* Previous orderstatus
* @var int
*/
protected $iPreviousOrderStatus;
/**
* Current orderstatus
* @var int
*/
protected $iCurrentOrderStatus;
/**
* Update, called by the observable object order
*
* @param Observable_Interface $oSubject
* @param string $sEvent
* @param mixed $mData
* @return void
*/
public function update(SplSubject $oSubject)
{
if(!$oSubject instanceof Order) {
return;
}
if(is_null($this->iPreviousOrderStatus)) {
$this->iPreviousOrderStatus = $oSubject->getStatus();
} else {
$this->iCurrentOrderStatus = $oSubject->getStatus();
if($this->iPreviousOrderStatus === Order::STATUS_SHIPPED && $this->iCurrentOrderStatus === Order::STATUS_DELIVERED) {
$sSubject = sprintf('Order number %d is shipped', $oSubject->getRef());
//mail('secratary@example.com', 'Order number %d is shipped', 'Text');
echo 'Mail sended to the secratary to help her remember to call our customer for a survey.';
}
}
}
}
$oOrder = new Order(26012011);
$oOrder->attach(new OrderStatusHandler());
$oOrder->updateStatus(Order::STATUS_DELIVERED);
$oOrder->delete();
?>
There are several problems with the implementation above. To most important disadvantage is that we have only one update method in our observer. In this update method we don’t know when and why we are getting notified, just that something happened. We should keep track of everything that happens in the subject. (Or use debug_backtrace… just joking, don’t even think about using it that way ever!).
Taking it a step further, events
Lets take a look at the next example, we will extend the Observer implementation with some an additional parameter for the eventname that occured.
Finishing up, optional data
iOrderRef = $iOrderRef;
// Get order information from the database or something else...
$this->iStatus = Order::STATUS_SHIPPED;
}
/**
* Attach an observer
*
* @param Observer_Interface $oObserver
* @return void
*/
public function attachObserver(Observer_Interface $oObserver)
{
$sHash = spl_object_hash($oObserver);
if (isset($this->aObservers[$sHash])) {
throw new Exception('Observer is already attached');
}
$this->aObservers[$sHash] = $oObserver;
}
/**
* Detach observer
*
* @param Observer_Interface $oObserver
* @return void
*/
public function detachObserver(Observer_Interface $oObserver)
{
$sHash = spl_object_hash($oObserver);
if (!isset($this->aObservers[$sHash])) {
throw new Exception('Observer not attached');
}
unset($this->aObservers[$sHash]);
}
/**
* Notify the attached observers
*
* @param string $sEvent, name of the event
* @param mixed $mData, optional data that is not directly available for the observers
* @return void
*/
public function notifyObserver($sEvent, $mData=null)
{
foreach ($this->aObservers as $oObserver) {
try {
$oObserver->update($this, $sEvent, $mData);
} catch(Exception $e) {
}
}
}
/**
* Add an order
*
* @param array $aOrder
* @return void
*/
public function add($aOrder = array())
{
$this->notifyObserver('onAdd');
}
/**
* Return the order reference number
*
* @return int
*/
public function getRef()
{
return $this->iOrderRef;
}
/**
* Return the current order status
*
* @return int
*/
public function getStatus()
{
return $this->iStatus;
}
/**
* Update the order status
*/
public function updateStatus($iStatus)
{
$this->notifyObserver('onBeforeUpdateStatus');
// ...
$this->iStatus = $iStatus;
// ...
$this->notifyObserver('onAfterUpdateStatus');
}
}
/**
* Order status handler, observer that sends an email to secretary
* if the status of an order changes from shipped to delivered, so the
* secratary can make a phone call to our customer to ask for his opinion about the service
*
* @package Shop
*/
class OrderStatusHandler implements Observer_Interface
{
protected $iPreviousOrderStatus;
protected $iCurrentOrderStatus;
/**
* Update, called by the observable object order
*
* @param Observable_Interface $oObservable
* @param string $sEvent
* @param mixed $mData
* @return void
*/
public function update(Observable_Interface $oObservable, $sEvent, $mData=null)
{
if(!$oObservable instanceof Order) {
return;
}
switch($sEvent) {
case 'onBeforeUpdateStatus':
$this->iPreviousOrderStatus = $oObservable->getStatus();
return;
case 'onAfterUpdateStatus':
$this->iCurrentOrderStatus = $oObservable->getStatus();
if($this->iPreviousOrderStatus === Order::STATUS_SHIPPED && $this->iCurrentOrderStatus === Order::STATUS_DELIVERED) {
$sSubject = sprintf('Order number %d is shipped', $oObservable->getRef());
//mail('secratary@example.com', 'Order number %d is shipped', 'Text');
echo 'Mail sended to the secratary to help her remember to call our customer for a survey.';
}
}
}
}
$oOrder = new Order(26012011);
$oOrder->attachObserver(new OrderStatusHandler());
$oOrder->updateStatus(Order::STATUS_DELIVERED);
$oOrder->add();
?>
Now we are able to take action on different events that occur.
Disadvantages
Although this implementation works quite well there are some drawbacks. One of those drawbacks is that we need to dispatch an event in our framework, if we don’t programmers can’t hook into our application. Triggering events everywhere give us a small performance penalty however I do think this way of working gives the programmers a nice way to hook into your application on those spots that you want them to hook in.
Just for the record
Notice that this code is just an example and can still use some improvements, for example: each observer is initialized even it will maybe never be notified, therefore I suggest to make use of lazy in some cases for loading the objects. There are other systems to hook into an application, more to follow!
раздвижной электрокарниз купить [url=www.razdvizhnoj-elektrokarniz.ru/]www.razdvizhnoj-elektrokarniz.ru/[/url] .
razdvijnoi elektrokarniz_bbei
19 Sep 25 at 9:51 am
фильмы про войну смотреть онлайн [url=kinogo-15.top]фильмы про войну смотреть онлайн[/url] .
kinogo_fwsa
19 Sep 25 at 9:51 am
фантастика онлайн [url=https://kinogo-14.top/]фантастика онлайн[/url] .
kinogo_ouEl
19 Sep 25 at 9:52 am
Oh no, rеgardless ɑt elite schools, children demand supplementary math emphasis іn order
to thrive with methods, ᴡhat unlocks doors intο advanced courses.
Catholic Junior College рrovides ɑ values-centered education rooted іn empathy and truth, developing ɑ welcoming community
where trainees thrive academically ɑnd spiritually.
With a focus on holistic growth, tһe college proνides robust programs in liberal arts and sciences, directed Ьy caring mentors
who inspire lifelong learning. Іts lively co-curricular scene, consisting оf sports and arts, promotes team effort ɑnd seⅼf-discovery in an encouraging atmosphere.
Opportunities fօr social work and worldwide exchanges build empathy аnd worldwide
p᧐int of views ɑmongst trainees. Alumni օften beϲome understanding leaders, equipped
tο make siցnificant contributions tⲟ society.
Anglo-Chinese School (Independent) Junior College рrovides ɑn enhancing education deeply rooted
in faith, where intellectual exploration іs harmoniously stabilized ѡith core ethical concepts, assisting trainees tⲟwards endng սρ being understanding and reѕponsible global residents equipped tо
attend to complicated social challenges. Ꭲһe school’s prominent International Baccalaureate Diploma Programme promotes sophisticated іmportant thinking, rеsearch
skills, and interdisciplinary learning, boosted Ьy extraordinary
resources like devoted development hubs ɑnd skilled faculty wwho mentor students іn achieving scholastic distinction. Ꭺ broad spectrum of ⅽo-curricular offerings, from advanced robotics ϲlubs
that motivate technological creativity tօ symphony
orchestras tһat hone musical skills, аllows students
to discover and fine-tune tһeir unique abilities іn a helpful aand
revitalizing environment. Βy incorporating service
knowing efforts, ѕuch aѕ community outreach tasks аnd volunteer programs Ьoth locally and worldwide,
tһe college cultivates а strong sense оf social responsibility,
compassion, ɑnd active citizenship among its student body.
Graduates օf Anglo-Chinese School (Independent) Junior College агe
incredibly ԝell-prepared fοr entry іnto elite
universities around the globe, bring with them a distinguished tradition ߋf
academic quality, individual integrity, аnd a
commitment to long-lasting learning and contribution.
Ⅾo not play play lah, link a excellent Junior College ρlus maths superiority in ordeг to assure higһ A
Levrls results plus effortless shifts.
Mums ɑnd Dads, worry аbout tһе difference hor, maths groundwork
remains vital at Junior College іn grasping figures, crucial wіtһin todаy’s digital sʏstem.
Aiyo, withߋut robust mah аt Junior College, еven toр establishment children may stumble in һigh school calculations, tһus build іt noᴡ leh.
In adⅾition fгom institution amenities, emphasize wіth mathematics fߋr ѕtop frequent pitfalls including sloppy blunders Ԁuring exams.
Ɗon’t relax іn JC Ⲩear 1; A-levels build on еarly foundations.
Wow, maths serves аs the foundation stone іn primary schooling, assisting kids f᧐r dimensional analysis tο building routes.
Alas, lacking robust mathematics ԁuring Junior College, rеgardless tоp school
youngsters mаү stumble at next-level algebra, thеrefore develop this immediaately leh.
Ꮮo᧐k into my webpage sec school singapore
sec school singapore
19 Sep 25 at 9:52 am
все займы онлайн [url=https://zaimy-12.ru/]https://zaimy-12.ru/[/url] .
zaimi_jdSt
19 Sep 25 at 9:54 am
Your style is really unique compared to other folks I’ve read stuff from.
Thank you for posting when you’ve got the opportunity, Guess I will just bookmark this blog.
Best SEO Services
19 Sep 25 at 9:54 am
сайт микрозаймов [url=www.zaimy-13.ru]www.zaimy-13.ru[/url] .
zaimi_zbKt
19 Sep 25 at 9:54 am
[b]Ёлка, ёлочка… Как выбрать ту самую?[/b]
Друзья, близится Новый год, и, думаю, многие уже задумались о главном атрибуте праздника – ёлке. И вот тут начинается головная боль! Искусственная или живая? Большая или маленькая? Пушистая или не очень? И если с искусственной еще можно более-менее определиться по картинке в интернете, то с живой – настоящий квест.
Едешь на ёлочный базар и глаза разбегаются: сосны, ели, пихты… Все разные, какие-то колючие, какие-то не очень, какие-то уже с осыпающимися иголками. И продавцы, конечно, все как один утверждают, что именно их ёлка – самая лучшая, самая свежая и самая пушистая.
И вот стоишь, как осел между двумя стогами сена, и не знаешь, что выбрать. Вроде и эта неплоха, и та ничего… А в итоге берешь первую попавшуюся, чтобы поскорее уехать домой в тепло. И потом жалеешь, что не потратил больше времени на выбор.
Искусственную покупать не хочется, все-таки живая ёлка – это запах хвои, атмосфера праздника… Но и мучиться с выбором каждый год тоже надоело. Может, есть какие-то хитрости, секреты, как правильно выбирать ёлку, чтобы она радовала глаз и долго стояла, не осыпаясь? Может, у кого-то есть проверенные места, где продают действительно хорошие ёлки?
Очень интересно услышать ваш опыт! Как вы выбираете новогоднюю елку? Какие у вас лайфхаки? Делитесь советами, буду очень признателен если расскажете как должна выглядеть лучшая [url=https://forum.dlink.ru/viewtopic.php?f=17&t=182497]новогодняя елка[/url]
Andresbak
19 Sep 25 at 9:55 am
сериалы тнт онлайн [url=https://www.kinogo-14.top]https://www.kinogo-14.top[/url] .
kinogo_zrEl
19 Sep 25 at 9:55 am
займы онлайн все [url=https://zaimy-13.ru/]https://zaimy-13.ru/[/url] .
zaimi_pzKt
19 Sep 25 at 9:57 am
накрутка подписчиков в тг канал боты
GustavoRiz
19 Sep 25 at 9:57 am
исторические фильмы [url=www.kinogo-14.top]исторические фильмы[/url] .
kinogo_vrEl
19 Sep 25 at 10:00 am
Thanks for sharing your thoughts on hire bodyguard in London. Regards
hire bodyguard in London
19 Sep 25 at 10:01 am
мфо займ [url=https://zaimy-12.ru/]https://zaimy-12.ru/[/url] .
zaimi_ssSt
19 Sep 25 at 10:03 am
микрозайм все [url=www.zaimy-15.ru]www.zaimy-15.ru[/url] .
zaimi_yzpn
19 Sep 25 at 10:06 am
все займы рф [url=www.zaimy-13.ru/]www.zaimy-13.ru/[/url] .
zaimi_zvKt
19 Sep 25 at 10:06 am
This is my first time pay a visit at here and i am actually impressed to read everthing at single place.
официальный сайт Максбетслотс казино
19 Sep 25 at 10:08 am
https://muckrack.com/person-27945093
RonaldWep
19 Sep 25 at 10:08 am
все микрозаймы [url=https://www.zaimy-14.ru]все микрозаймы[/url] .
zaimi_hzSr
19 Sep 25 at 10:09 am
From beaches to golf courses: The world’s most unusual airport runways
[url=https://trip-skan.win]трипскан вход[/url]
When it comes to travel, wherever you are in the world, some things never change. McDonald’s is always McDonald’s. A hotel lobby is always a hotel lobby. An inflight safety demonstration is always a safety demonstration, and an airport runway is an airport runway: a long, clean-lined strip of asphalt free of all external interference; a sterile environment that could be anywhere on the planet.
Or maybe not. Because when it comes to airport runways, once the safety side is taken care of, in a few parts of the world, things get a little inventive. Maybe you’ll land on a manmade island in the middle of the sea. Maybe you’ll wave at golfers on the 18-hole course between the two runways. Or maybe you’ll hit the beach faster than expected — by stepping off the airplane onto the sand.
https://trip-skan.win
tripscan top
From runways you can drive across to weird and wonderful airport locations, here are 12 of our favorite out-there runways.
Barra Airport, Scotland (BRR)
If nothing comes between you and your beach break, then Barra, in Scotland’s Outer Hebrides, is your kind of airport. This is the only place in the world where the runway is on the beach itself.
Just one flight route operates here: Loganair’s 140-mile connection with Glasgow, using 19-seater de Havilland Canada DHC-6 Twin Otter aircraft. Pilots heading to Barra — an island just eight miles long — must line up and touch down on Traigh Mhor, a wide bay in the north of the island (if Barra is shaped like a turtle, Traigh Mhor is its neck), landing straight onto the sand. Flights must be timed with the tides to allow as much space to land and take off as possible.
Passengers walk across the beach to the terminal on the other side of the dunes, then get a last bit of sand underfoot as they board the aircraft for the flight back to the mainland. With these conditions, it’s little wonder that flights are canceled with a fair amount of regularity — so you may want to build in extra time before planning onward connections.
But even a delayed return is worth it for avgeeks. On this tiny plane, passengers experience the flight in close proximity to the pilots — when CNN took a spin on the flight in 2019, they could even see the pilot’s GPS instruments from their seat.
Related article
A lead photo of various travel products that can help pass time in airports
CNN Underscored: Flight delayed? These 14 products will help you pass the time at the airport
Hong Kong International Airport (HKG)
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport.
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport. d3sign/Moment RF/Getty Images
For the busiest cargo airport in the world, you need space. Luckily, Hong Kong created an entire island for its airport which, when it opened, had the world’s largest passenger terminal, too. Built to replace its predecessor (a single runway in crowded Kowloon, which was notorious for its violent turns on take-off and landing), HKG sits over the original islet of Chek Lap Kok, which was quadrupled in size with reclaimed land to house the two-runway airport. President Bill Clinton was among the first foreigners to touch down after the airport opened in 1998.
Located next to Lantau Island, the airport has views for days — the sides of the terminals are largely glass, built to shatter (and therefore preserve the building) during potential typhoons. Even getting there is a treat — the 1.4-mile Tsing Ma bridge, which connects HKG to Ma Wan island, heading towards the city, debuted as the longest road-and-rail suspension bridge in the world.
Arturokaw
19 Sep 25 at 10:11 am
I have read some just right stuff here. Certainly price bookmarking for revisiting.
I wonder how so much effort you put to make the sort of wonderful informative web site.
UProxy
19 Sep 25 at 10:11 am
микрозайм все [url=www.zaimy-12.ru]www.zaimy-12.ru[/url] .
zaimi_jkSt
19 Sep 25 at 10:12 am
список займов онлайн на карту [url=http://www.zaimy-14.ru]http://www.zaimy-14.ru[/url] .
zaimi_gnSr
19 Sep 25 at 10:12 am
Hi! I could have sworn I’ve been to this website before
but after looking at some of the posts I realized it’s new to
me. Regardless, I’m certainly happy I found it and I’ll be bookmarking it and checking back often!
Also visit my website; Air conditioner Cleaning
Air conditioner Cleaning
19 Sep 25 at 10:15 am
список займов онлайн [url=www.zaimy-14.ru]www.zaimy-14.ru[/url] .
zaimi_cpSr
19 Sep 25 at 10:15 am
займы онлайн [url=www.zaimy-13.ru/]займы онлайн[/url] .
zaimi_oiKt
19 Sep 25 at 10:15 am
Thanks for any other informative site. The place else may just I am getting that kind
of information written in such a perfect
approach? I’ve a mission that I’m just now working on, and
I’ve been on the look out for such information.
Fence
19 Sep 25 at 10:15 am
I am not sure where you’re getting your info, but good topic.
I needs to spend some time learning more or understanding more.
Thanks for wonderful information I was looking for this
info for my mission.
deutsche online casino
19 Sep 25 at 10:15 am
kinogo [url=https://www.kinogo-14.top]kinogo[/url] .
kinogo_iqEl
19 Sep 25 at 10:16 am
займ все [url=www.zaimy-12.ru/]www.zaimy-12.ru/[/url] .
zaimi_nqSt
19 Sep 25 at 10:16 am
What you published was actually very logical. However,
think about this, what if you added a little information? I ain’t suggesting your information is not solid.,
but suppose you added a post title to possibly get people’s attention? I mean PHP hook, building hooks in your application – Sjoerd Maessen blog at Sjoerd Maessen blog is a
little boring. You might glance at Yahoo’s home page and note how they write news titles to get viewers to open the links.
You might add a related video or a related pic
or two to grab people excited about everything’ve written. Just my opinion, it might
bring your posts a little bit more interesting.
Crownmark Dexlin Scam
19 Sep 25 at 10:17 am
накрутка подписчиков телеграм канал купить
JohnnyPhido
19 Sep 25 at 10:18 am
смотреть сериалы новинки [url=https://kinogo-15.top/]смотреть сериалы новинки[/url] .
kinogo_xvsa
19 Sep 25 at 10:18 am
раздвижные карнизы [url=https://razdvizhnoj-elektrokarniz.ru]https://razdvizhnoj-elektrokarniz.ru[/url] .
razdvijnoi elektrokarniz_ezei
19 Sep 25 at 10:18 am
Link building
Backlinks for SEO consist of anchor links and their non-anchor counterparts.
Anchor links are linked to the main keyword, because the key query is fundamental for SEO performance.
Non-anchor backlinks are equally significant – these are simple hyperlinks, and user interaction plays a key role because they offer a route to search engine crawlers; search engines access the target page along with internal pages, which benefits your project.
Progress reports are delivered via ahrefs. If there are fewer links for a specific tool, I report on the service that shows more in backlink volume due to indexing delays.
Link building
19 Sep 25 at 10:19 am
займы онлайн [url=http://zaimy-13.ru/]займы онлайн[/url] .
zaimi_loKt
19 Sep 25 at 10:19 am
смотреть фильмы онлайн [url=http://kinogo-14.top/]смотреть фильмы онлайн[/url] .
kinogo_zqEl
19 Sep 25 at 10:20 am
Wonderful website. Plenty of useful information here. I’m sending it
to a few buddies ans also sharing in delicious. And obviously, thanks
to your effort!
https://github.com/
19 Sep 25 at 10:21 am
From beaches to golf courses: The world’s most unusual airport runways
[url=https://trip-skan.win]tripscan top[/url]
When it comes to travel, wherever you are in the world, some things never change. McDonald’s is always McDonald’s. A hotel lobby is always a hotel lobby. An inflight safety demonstration is always a safety demonstration, and an airport runway is an airport runway: a long, clean-lined strip of asphalt free of all external interference; a sterile environment that could be anywhere on the planet.
Or maybe not. Because when it comes to airport runways, once the safety side is taken care of, in a few parts of the world, things get a little inventive. Maybe you’ll land on a manmade island in the middle of the sea. Maybe you’ll wave at golfers on the 18-hole course between the two runways. Or maybe you’ll hit the beach faster than expected — by stepping off the airplane onto the sand.
https://trip-skan.win
трип скан
From runways you can drive across to weird and wonderful airport locations, here are 12 of our favorite out-there runways.
Barra Airport, Scotland (BRR)
If nothing comes between you and your beach break, then Barra, in Scotland’s Outer Hebrides, is your kind of airport. This is the only place in the world where the runway is on the beach itself.
Just one flight route operates here: Loganair’s 140-mile connection with Glasgow, using 19-seater de Havilland Canada DHC-6 Twin Otter aircraft. Pilots heading to Barra — an island just eight miles long — must line up and touch down on Traigh Mhor, a wide bay in the north of the island (if Barra is shaped like a turtle, Traigh Mhor is its neck), landing straight onto the sand. Flights must be timed with the tides to allow as much space to land and take off as possible.
Passengers walk across the beach to the terminal on the other side of the dunes, then get a last bit of sand underfoot as they board the aircraft for the flight back to the mainland. With these conditions, it’s little wonder that flights are canceled with a fair amount of regularity — so you may want to build in extra time before planning onward connections.
But even a delayed return is worth it for avgeeks. On this tiny plane, passengers experience the flight in close proximity to the pilots — when CNN took a spin on the flight in 2019, they could even see the pilot’s GPS instruments from their seat.
Related article
A lead photo of various travel products that can help pass time in airports
CNN Underscored: Flight delayed? These 14 products will help you pass the time at the airport
Hong Kong International Airport (HKG)
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport.
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport. d3sign/Moment RF/Getty Images
For the busiest cargo airport in the world, you need space. Luckily, Hong Kong created an entire island for its airport which, when it opened, had the world’s largest passenger terminal, too. Built to replace its predecessor (a single runway in crowded Kowloon, which was notorious for its violent turns on take-off and landing), HKG sits over the original islet of Chek Lap Kok, which was quadrupled in size with reclaimed land to house the two-runway airport. President Bill Clinton was among the first foreigners to touch down after the airport opened in 1998.
Located next to Lantau Island, the airport has views for days — the sides of the terminals are largely glass, built to shatter (and therefore preserve the building) during potential typhoons. Even getting there is a treat — the 1.4-mile Tsing Ma bridge, which connects HKG to Ma Wan island, heading towards the city, debuted as the longest road-and-rail suspension bridge in the world.
JamesUsabs
19 Sep 25 at 10:21 am
займер ру [url=http://zaimy-12.ru]займер ру[/url] .
zaimi_adSt
19 Sep 25 at 10:21 am
кинопоиск смотреть онлайн [url=https://kinogo-14.top/]кинопоиск смотреть онлайн[/url] .
kinogo_gvEl
19 Sep 25 at 10:22 am
официальные займы онлайн на карту бесплатно [url=www.zaimy-13.ru]www.zaimy-13.ru[/url] .
zaimi_svKt
19 Sep 25 at 10:24 am
Have you ever thought about including a little bit more than just your articles?
I mean, what you say is important and everything. However think
of if you added some great visuals or videos to give your posts more, “pop”!
Your content is excellent but with images and videos, this site could definitely be one of the most beneficial in its field.
Wonderful blog!
canadian online pharmacies
19 Sep 25 at 10:24 am
займы всем [url=https://www.zaimy-14.ru]https://www.zaimy-14.ru[/url] .
zaimi_ajSr
19 Sep 25 at 10:24 am
Cash Pandas играть в Пинко
Davidfes
19 Sep 25 at 10:25 am
bs2best at, bs2web at и bs2 market: глубокий анализ технологий 2025 года
bs2best
bs2best.at blacksprut marketplace Official
CharlesNarry
19 Sep 25 at 10:25 am
Catrinas Coins online Turkey
JoshuaStism
19 Sep 25 at 10:26 am
From beaches to golf courses: The world’s most unusual airport runways
[url=https://trip-skan.win]трипскан вход[/url]
When it comes to travel, wherever you are in the world, some things never change. McDonald’s is always McDonald’s. A hotel lobby is always a hotel lobby. An inflight safety demonstration is always a safety demonstration, and an airport runway is an airport runway: a long, clean-lined strip of asphalt free of all external interference; a sterile environment that could be anywhere on the planet.
Or maybe not. Because when it comes to airport runways, once the safety side is taken care of, in a few parts of the world, things get a little inventive. Maybe you’ll land on a manmade island in the middle of the sea. Maybe you’ll wave at golfers on the 18-hole course between the two runways. Or maybe you’ll hit the beach faster than expected — by stepping off the airplane onto the sand.
https://trip-skan.win
трипскан сайт
From runways you can drive across to weird and wonderful airport locations, here are 12 of our favorite out-there runways.
Barra Airport, Scotland (BRR)
If nothing comes between you and your beach break, then Barra, in Scotland’s Outer Hebrides, is your kind of airport. This is the only place in the world where the runway is on the beach itself.
Just one flight route operates here: Loganair’s 140-mile connection with Glasgow, using 19-seater de Havilland Canada DHC-6 Twin Otter aircraft. Pilots heading to Barra — an island just eight miles long — must line up and touch down on Traigh Mhor, a wide bay in the north of the island (if Barra is shaped like a turtle, Traigh Mhor is its neck), landing straight onto the sand. Flights must be timed with the tides to allow as much space to land and take off as possible.
Passengers walk across the beach to the terminal on the other side of the dunes, then get a last bit of sand underfoot as they board the aircraft for the flight back to the mainland. With these conditions, it’s little wonder that flights are canceled with a fair amount of regularity — so you may want to build in extra time before planning onward connections.
But even a delayed return is worth it for avgeeks. On this tiny plane, passengers experience the flight in close proximity to the pilots — when CNN took a spin on the flight in 2019, they could even see the pilot’s GPS instruments from their seat.
Related article
A lead photo of various travel products that can help pass time in airports
CNN Underscored: Flight delayed? These 14 products will help you pass the time at the airport
Hong Kong International Airport (HKG)
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport.
In Hong Kong, the islet of Chek Lap Kok was massively extended to create an island big enough to house a major international airport. d3sign/Moment RF/Getty Images
For the busiest cargo airport in the world, you need space. Luckily, Hong Kong created an entire island for its airport which, when it opened, had the world’s largest passenger terminal, too. Built to replace its predecessor (a single runway in crowded Kowloon, which was notorious for its violent turns on take-off and landing), HKG sits over the original islet of Chek Lap Kok, which was quadrupled in size with reclaimed land to house the two-runway airport. President Bill Clinton was among the first foreigners to touch down after the airport opened in 1998.
Located next to Lantau Island, the airport has views for days — the sides of the terminals are largely glass, built to shatter (and therefore preserve the building) during potential typhoons. Even getting there is a treat — the 1.4-mile Tsing Ma bridge, which connects HKG to Ma Wan island, heading towards the city, debuted as the longest road-and-rail suspension bridge in the world.
Jamestum
19 Sep 25 at 10:28 am
микрозаймы все [url=www.zaimy-12.ru]www.zaimy-12.ru[/url] .
zaimi_kqSt
19 Sep 25 at 10:29 am
kraken ссылка зеркало kraken onion, kraken onion ссылка, kraken onion зеркала, kraken рабочая ссылка onion, сайт kraken onion, kraken darknet, kraken darknet market, kraken darknet ссылка, сайт kraken darknet, kraken актуальные ссылки, кракен ссылка kraken, kraken официальные ссылки, kraken ссылка тор, kraken ссылка зеркало, kraken ссылка на сайт, kraken онион, kraken онион тор, кракен онион, кракен онион тор, кракен онион зеркало, кракен даркнет маркет, кракен darknet, кракен onion, кракен ссылка onion, кракен onion сайт, kra ссылка, kraken сайт, kraken актуальные ссылки, kraken зеркало, kraken ссылка зеркало, kraken зеркало рабочее, актуальные зеркала kraken, kraken сайт зеркала, kraken маркетплейс зеркало, кракен ссылка, кракен даркнет
RichardPep
19 Sep 25 at 10:31 am