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=http://razdvizhnoj-elektrokarniz.ru]http://razdvizhnoj-elektrokarniz.ru[/url] .
razdvijnoi elektrokarniz_wnei
19 Sep 25 at 7:01 am
займер ру [url=zaimy-11.ru]zaimy-11.ru[/url] .
zaimi_nxPt
19 Sep 25 at 7:02 am
Hi there! This post could not be written any better! Reading this post reminds me of my old room mate!
He always kept chatting about this. I will forward this article
to him. Pretty sure he will have a good read. Thank you
for sharing!
NH88
19 Sep 25 at 7:02 am
I believe that is one of the most important information for me.
And i’m satisfied reading your article. However should observation on some basic things, The site taste
is ideal, the articles is actually excellent : D. Excellent activity,
cheers
搜狗 搜索 推广
19 Sep 25 at 7:04 am
официальные займы онлайн на карту бесплатно [url=https://zaimy-15.ru/]https://zaimy-15.ru/[/url] .
zaimi_zupn
19 Sep 25 at 7:04 am
Disney made a smart choice’
Despite the comparisons, Abu Dhabi isn’t positioning itself as a direct rival to Orlando — it’s aiming to be something more. The emirate sees its theme parks as part of a bigger portfolio of attractions, alongside cultural landmarks, luxury hotels, pristine beaches, and desert adventures.
[url=https://trip-skan.win]трип скан[/url]
A 15-minute drive from Yas Island, Saadiyat Island is home to the Louvre Abu Dhabi, a franchised outpost of the famous Paris art museum, which welcomed 1.4 million visitors last year, 84% from abroad. The Guggenheim Abu Dhabi and Zayed National Museum are both under construction, adding to a cultural district that will be one of the region’s most concentrated hubs of art and heritage.
“Abu Dhabi’s unique appeal lies in the diversity of our tourism offering,” Al Geziry added. “For thrill-seekers, we have record-breaking roller coasters and dune bashing in the desert. For culture lovers, historic sites like Al Ain Oasis and institutions like the Saadiyat museums. And for luxury travelers, world-class dining, private island resorts, and high-end shopping.
“Where else can you start your day under the Louvre’s iconic rain-of-light dome and end it in the immersive, story-driven worlds of Warner Bros. World or Ferrari World?”
https://trip-skan.win
tripscan top
Still, not everyone is convinced that Disney’s expansion into the Middle East is a sure bet.
“The region has seen its share of false starts,” says Dennis Speigel, founder of the International Theme Park Services consultancy, comparing it to neighboring Dubai’s patchy record with theme park expansion ambitions in the mid-2010s. “Several of them struggled for profitability in their first decade.”
Related article
Saadiyat Cultural District in Abu Dhabi is set to become one of the world’s preeminent arts and culture hubs, with one of the highest concentrations of cultural institutions globally. But the area isn’t just for art connoisseurs. Explore what to do in the new district, from iconic museums to luxurious beach days to decadent dining options.
You can walk between the Louvre and the Guggenheim in this new art district
Spiegel believes Abu Dhabi is different. “Disney made a smart choice. The infrastructure, safety, and existing leisure developments create an ideal entry point,” he told CNN earlier this year. “It’s a much more controlled and calculated move.”
Under its Tourism Strategy 2030, Abu Dhabi aims to grow annual visitors from 24 million in 2023 to more than 39 million by the end of the decade. With Disneyland as a centerpiece, those targets may well be surpassed. The city’s population has already grown from 2.7 million in 2014 to more than 4.1 million today, a reflection of its rising profile as a regional hub.
Yas Island alone has been transformed in the space of a decade from a largely undeveloped stretch of sand to a self-contained resort destination, complete with golf courses, marinas, a mall, more than 160 restaurants, and a cluster of high-end hotels.
Orlando’s head start remains formidable — it still offers multiple Disney and Universal parks, has decades of brand loyalty, and an infrastructure built to handle tens of millions of tourists annually.
But Abu Dhabi is catching up fast. Its combination of frictionless travel, year-round comfort, cutting-edge attractions, and a cultural scene that adds depth to the experience gives Abu Dhabi its own unique selling point, potentially offering a model for the next generation of theme park capital.
Jaredjodia
19 Sep 25 at 7:04 am
электрические карнизы купить [url=www.razdvizhnoj-elektrokarniz.ru]www.razdvizhnoj-elektrokarniz.ru[/url] .
razdvijnoi elektrokarniz_vbei
19 Sep 25 at 7:04 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
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.
RafaelVoins
19 Sep 25 at 7:06 am
Here’s one other example: in chapter 18, Tock says they’ve been touring for
“days”, after which we read this: “Weeks,” corrected the bug, flopping into a deep comfy armchair,
for it did seem that method to him.
GRATIS VIAGRA
19 Sep 25 at 7:07 am
микрозаймы все [url=https://zaimy-11.ru/]https://zaimy-11.ru/[/url] .
zaimi_ebPt
19 Sep 25 at 7:08 am
микрозаймы все [url=http://zaimy-15.ru]http://zaimy-15.ru[/url] .
zaimi_hbpn
19 Sep 25 at 7:08 am
накрутка подписчиков тг
JohnnyPhido
19 Sep 25 at 7:08 am
After checking out a handful of the blog articles on your site, I honestly like your technique of blogging.
I book marked it to my bookmark webpage list and will be checking back in the near future.
Please visit my website too and let me know how you feel.
구글 아이디 구매
19 Sep 25 at 7:09 am
все микрозаймы онлайн [url=www.zaimy-12.ru/]www.zaimy-12.ru/[/url] .
zaimi_rlSt
19 Sep 25 at 7:09 am
Hey, I think your blog might be having browser compatibility issues.
When I look at your blog site in Firefox, it looks fine but when opening in Internet Explorer,
it has some overlapping. I just wanted to give you a quick
heads up! Other then that, superb blog!
Trade 350 App
19 Sep 25 at 7:10 am
https://www.brownbook.net/business/54267565/кокаин-лимассол-купить/
RonaldWep
19 Sep 25 at 7:11 am
Situs VW108 adalah situs login slot gacor terbaik dengan link alternatif anti blokir.
Bersertifikat resmi sehingga bukan situs bodong dan nyaman dimainkan kapan saja.
vw108
19 Sep 25 at 7:11 am
все микрозаймы [url=https://zaimy-15.ru/]все микрозаймы[/url] .
zaimi_sspn
19 Sep 25 at 7:11 am
Excellent blog you have here but I was wondering if you knew of any message boards that cover the same
topics discussed here? I’d really like to be a part of community where I can get
opinions from other knowledgeable individuals that share the same interest.
If you have any recommendations, please let me know.
Kudos!
ТУРБО казино бездепозитный бонус
19 Sep 25 at 7:11 am
фильмы ужасов смотреть онлайн [url=kinogo-15.top]фильмы ужасов смотреть онлайн[/url] .
kinogo_eqsa
19 Sep 25 at 7:12 am
все займы ру [url=http://zaimy-11.ru/]http://zaimy-11.ru/[/url] .
zaimi_fmPt
19 Sep 25 at 7:12 am
bs2best at, bs2web at и bs2 market: глубокий анализ технологий 2025 года
blsp at
bs2best.at blacksprut marketplace Official
CharlesNarry
19 Sep 25 at 7:16 am
смотреть боевики [url=http://www.kinogo-14.top]смотреть боевики[/url] .
kinogo_nxEl
19 Sep 25 at 7:16 am
смотреть комедии онлайн [url=http://kinogo-15.top]смотреть комедии онлайн[/url] .
kinogo_wmsa
19 Sep 25 at 7:17 am
все займы онлайн [url=www.zaimy-12.ru]www.zaimy-12.ru[/url] .
zaimi_igSt
19 Sep 25 at 7:17 am
все займы рф [url=zaimy-11.ru]zaimy-11.ru[/url] .
zaimi_goPt
19 Sep 25 at 7:17 am
карниз раздвижной купить [url=http://razdvizhnoj-elektrokarniz.ru/]http://razdvizhnoj-elektrokarniz.ru/[/url] .
razdvijnoi elektrokarniz_xpei
19 Sep 25 at 7:17 am
Публикация предлагает читателю не просто информацию, а инструменты для анализа и саморазвития. Мы стимулируем критическое мышление, предлагая различные точки зрения и призывая к самостоятельному поиску решений.
Детали по клику – https://tecnodrive.com.mx/committed-to-superior-quality
RobertWic
19 Sep 25 at 7:18 am
Disney made a smart choice’
Despite the comparisons, Abu Dhabi isn’t positioning itself as a direct rival to Orlando — it’s aiming to be something more. The emirate sees its theme parks as part of a bigger portfolio of attractions, alongside cultural landmarks, luxury hotels, pristine beaches, and desert adventures.
[url=https://trip-skan.win]tripskan[/url]
A 15-minute drive from Yas Island, Saadiyat Island is home to the Louvre Abu Dhabi, a franchised outpost of the famous Paris art museum, which welcomed 1.4 million visitors last year, 84% from abroad. The Guggenheim Abu Dhabi and Zayed National Museum are both under construction, adding to a cultural district that will be one of the region’s most concentrated hubs of art and heritage.
“Abu Dhabi’s unique appeal lies in the diversity of our tourism offering,” Al Geziry added. “For thrill-seekers, we have record-breaking roller coasters and dune bashing in the desert. For culture lovers, historic sites like Al Ain Oasis and institutions like the Saadiyat museums. And for luxury travelers, world-class dining, private island resorts, and high-end shopping.
“Where else can you start your day under the Louvre’s iconic rain-of-light dome and end it in the immersive, story-driven worlds of Warner Bros. World or Ferrari World?”
https://trip-skan.win
трипскан сайт
Still, not everyone is convinced that Disney’s expansion into the Middle East is a sure bet.
“The region has seen its share of false starts,” says Dennis Speigel, founder of the International Theme Park Services consultancy, comparing it to neighboring Dubai’s patchy record with theme park expansion ambitions in the mid-2010s. “Several of them struggled for profitability in their first decade.”
Related article
Saadiyat Cultural District in Abu Dhabi is set to become one of the world’s preeminent arts and culture hubs, with one of the highest concentrations of cultural institutions globally. But the area isn’t just for art connoisseurs. Explore what to do in the new district, from iconic museums to luxurious beach days to decadent dining options.
You can walk between the Louvre and the Guggenheim in this new art district
Spiegel believes Abu Dhabi is different. “Disney made a smart choice. The infrastructure, safety, and existing leisure developments create an ideal entry point,” he told CNN earlier this year. “It’s a much more controlled and calculated move.”
Under its Tourism Strategy 2030, Abu Dhabi aims to grow annual visitors from 24 million in 2023 to more than 39 million by the end of the decade. With Disneyland as a centerpiece, those targets may well be surpassed. The city’s population has already grown from 2.7 million in 2014 to more than 4.1 million today, a reflection of its rising profile as a regional hub.
Yas Island alone has been transformed in the space of a decade from a largely undeveloped stretch of sand to a self-contained resort destination, complete with golf courses, marinas, a mall, more than 160 restaurants, and a cluster of high-end hotels.
Orlando’s head start remains formidable — it still offers multiple Disney and Universal parks, has decades of brand loyalty, and an infrastructure built to handle tens of millions of tourists annually.
But Abu Dhabi is catching up fast. Its combination of frictionless travel, year-round comfort, cutting-edge attractions, and a cultural scene that adds depth to the experience gives Abu Dhabi its own unique selling point, potentially offering a model for the next generation of theme park capital.
Stevengaupe
19 Sep 25 at 7:19 am
смотреть фильмы бесплатно [url=http://kinogo-15.top]смотреть фильмы бесплатно[/url] .
kinogo_hhsa
19 Sep 25 at 7:19 am
I loved as much as you’ll receive carried out right here.
The sketch is attractive, your authored material stylish.
nonetheless, you command get got an nervousness over that you wish be delivering
the following. unwell unquestionably come more formerly again as
exactly the same nearly a lot often inside case you shield this increase.
Dutch reviews
19 Sep 25 at 7:19 am
At WebPtoPNGHero.com, converting WebP images into PNG format couldn’t be simpler. The interface features a drag-and-drop area where images load instantly, and conversion begins on secure cloud servers. A progress meter keeps you informed, and once each file finishes, PNG versions appear as clickable download links. If you have many images to process, batch mode handles multiple files at the same time, saving precious minutes. The tool runs entirely in your web browser, making it compatible with Windows, macOS, Linux, Android, and iOS alike. No need to install any applications or plugins—just open the site and start converting. All uploads vanish shortly after processing, ensuring privacy and security. Whether you’re optimizing visuals for an e-commerce store, preparing photos for email attachments, or simply sharing snapshots online, WebPtoPNGHero.com delivers reliable, high-fidelity results. The service remains free and ad-free, with no registration required. Convert your WebP images to universally supported PNG files quickly and without hassle.
WebPtoPNGHero
LewisGuatt
19 Sep 25 at 7:19 am
микрозаймы онлайн [url=zaimy-15.ru]микрозаймы онлайн[/url] .
zaimi_ospn
19 Sep 25 at 7:22 am
займы все онлайн [url=https://zaimy-13.ru/]https://zaimy-13.ru/[/url] .
zaimi_ncKt
19 Sep 25 at 7:22 am
смотреть русские сериалы [url=http://kinogo-14.top/]смотреть русские сериалы[/url] .
kinogo_qhEl
19 Sep 25 at 7:22 am
From beaches to golf courses: The world’s most unusual airport runways
[url=https://trip-skan.win]trip scan[/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
trip scan
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.
Richardjem
19 Sep 25 at 7:23 am
Don Mueang International Airport, Thailand (DMK)
[url=https://trip-skan.win]трипскан вход[/url]
Are you an avgeek with a mean handicap? Then it’s time to tee off in Bangkok, where Don Mueang International Airport has an 18-hole golf course between its two runways. If you’re nervous from a safety point of view, don’t be — players at the Kantarat course must go through airport-style security before they hit the grass. Oh, you meant safety on the course? Just beware of those flying balls, because there are no barriers between the course and the runways. Players are, at least, shown a red light when a plane is coming in to land so don’t get too distracted by the game.
https://trip-skan.win
трипскан вход
Although Suvarnabhumi (BKK) is Bangkok’s main airport these days — it opened in 2006 —Don Mueang, which started out as a Royal Thai Air Force base in 1914, remains Bangkok’s budget airline hub, with brands including Thai Air Asia and Thai Lion Air using it as their base. Although you’re more likely to see narrowbodies these days, you may just get lucky — in 2022, an Emirates A380 made an emergency landing here. Imagine the views from the course that day.
Related article
Sporty airport outfit being worn by writer
CNN Underscored: Flying sucks. Make it better with these comfy airport outfits for women
Sumburgh Airport, Scotland (LSI)
The road south from Lerwick cuts across the runway of Sumburgh Airport on Shetland.
The road south from Lerwick cuts across the runway of Sumburgh Airport on Shetland. Alan Morris/iStock Editorial/Getty Images
Planning a trip to Jarlshof, the extraordinarily well-preserved Bronze Age settlement towards the southern tip of Shetland? You may need to build in some extra time. The ancient and Viking-era ruins, called one of the UK’s greatest archaeological sites, sit just beyond one of the runways of Sumburgh, Shetland’s main airport — and reaching them means driving, cycling or walking across the runway itself.
There’s only one road heading due south from the capital, Lerwick; and while it ducks around most of the airport’s perimeter, skirting the two runways, the road cuts directly across the western end of one of them. A staff member occupies a roadside hut, and before take-offs and landings, comes out to lower a barrier across the road. Once the plane is where it needs to be, up come the barriers and waiting drivers get a friendly thumbs up.
Amata Kabua International Airport, Marshall Islands (MAJ)
Fly into Majuro and you’ll skim across the Pacific and land on the runway that’s just about as wide as the sandbar-like island itself.
Fly into Majuro and you’ll skim across the Pacific and land on the runway that’s just about as wide as the sandbar-like island itself. mtcurado/iStockphoto/Getty Images
Imagine flying into Majuro, the capital of the Marshall Islands in Micronesia. You’re descending down, down, and further down towards the Pacific, no land in sight. Then you’re suddenly above a pencil-thin atoll — can you really be about to land here? Yes you are, with cars racing past the runway no less, matching you for speed.
Majuro’s Amata Kabua International Airport gives a whole new meaning to the phrase “water landing”. Its single runway, just shy of 8,000ft, is a slim strip of asphalt over the sandbar that’s barely any wider than the atoll itself — and the island is so remote that when the runway was resurfaced, materials had to be transported from the Philippines, Hong Kong and Korea, according to the constructors. “Lagoon Road” — the 30-mile road that runs from top to toe on Majuro — skims alongside the runway.
Don’t think about pulling over, though — there’s only sand and sea on one side, and that runway the other.
Related article
Barra Airport, Scotland
At Scotland’s beach airport, the runway disappears at high tide
KevinDiz
19 Sep 25 at 7:23 am
накрутка подписчиков тг
JohnnyPhido
19 Sep 25 at 7:26 am
bs2best at, bs2web at и bs2 market: глубокий анализ технологий 2025 года
blsp at
bs2best.at blacksprut Official
Jamesner
19 Sep 25 at 7:26 am
Don Mueang International Airport, Thailand (DMK)
[url=https://trip-skan.win]tripscan[/url]
Are you an avgeek with a mean handicap? Then it’s time to tee off in Bangkok, where Don Mueang International Airport has an 18-hole golf course between its two runways. If you’re nervous from a safety point of view, don’t be — players at the Kantarat course must go through airport-style security before they hit the grass. Oh, you meant safety on the course? Just beware of those flying balls, because there are no barriers between the course and the runways. Players are, at least, shown a red light when a plane is coming in to land so don’t get too distracted by the game.
https://trip-skan.win
трип скан
Although Suvarnabhumi (BKK) is Bangkok’s main airport these days — it opened in 2006 —Don Mueang, which started out as a Royal Thai Air Force base in 1914, remains Bangkok’s budget airline hub, with brands including Thai Air Asia and Thai Lion Air using it as their base. Although you’re more likely to see narrowbodies these days, you may just get lucky — in 2022, an Emirates A380 made an emergency landing here. Imagine the views from the course that day.
Related article
Sporty airport outfit being worn by writer
CNN Underscored: Flying sucks. Make it better with these comfy airport outfits for women
Sumburgh Airport, Scotland (LSI)
The road south from Lerwick cuts across the runway of Sumburgh Airport on Shetland.
The road south from Lerwick cuts across the runway of Sumburgh Airport on Shetland. Alan Morris/iStock Editorial/Getty Images
Planning a trip to Jarlshof, the extraordinarily well-preserved Bronze Age settlement towards the southern tip of Shetland? You may need to build in some extra time. The ancient and Viking-era ruins, called one of the UK’s greatest archaeological sites, sit just beyond one of the runways of Sumburgh, Shetland’s main airport — and reaching them means driving, cycling or walking across the runway itself.
There’s only one road heading due south from the capital, Lerwick; and while it ducks around most of the airport’s perimeter, skirting the two runways, the road cuts directly across the western end of one of them. A staff member occupies a roadside hut, and before take-offs and landings, comes out to lower a barrier across the road. Once the plane is where it needs to be, up come the barriers and waiting drivers get a friendly thumbs up.
Amata Kabua International Airport, Marshall Islands (MAJ)
Fly into Majuro and you’ll skim across the Pacific and land on the runway that’s just about as wide as the sandbar-like island itself.
Fly into Majuro and you’ll skim across the Pacific and land on the runway that’s just about as wide as the sandbar-like island itself. mtcurado/iStockphoto/Getty Images
Imagine flying into Majuro, the capital of the Marshall Islands in Micronesia. You’re descending down, down, and further down towards the Pacific, no land in sight. Then you’re suddenly above a pencil-thin atoll — can you really be about to land here? Yes you are, with cars racing past the runway no less, matching you for speed.
Majuro’s Amata Kabua International Airport gives a whole new meaning to the phrase “water landing”. Its single runway, just shy of 8,000ft, is a slim strip of asphalt over the sandbar that’s barely any wider than the atoll itself — and the island is so remote that when the runway was resurfaced, materials had to be transported from the Philippines, Hong Kong and Korea, according to the constructors. “Lagoon Road” — the 30-mile road that runs from top to toe on Majuro — skims alongside the runway.
Don’t think about pulling over, though — there’s only sand and sea on one side, and that runway the other.
Related article
Barra Airport, Scotland
At Scotland’s beach airport, the runway disappears at high tide
KeithCepay
19 Sep 25 at 7:26 am
электрокарниз купить в москве [url=http://razdvizhnoj-elektrokarniz.ru]http://razdvizhnoj-elektrokarniz.ru[/url] .
razdvijnoi elektrokarniz_yjei
19 Sep 25 at 7:26 am
все микрозаймы [url=www.zaimy-12.ru/]www.zaimy-12.ru/[/url] .
zaimi_jpSt
19 Sep 25 at 7:27 am
фильмы про войну смотреть онлайн [url=https://www.kinogo-14.top]https://www.kinogo-14.top[/url] .
kinogo_xxEl
19 Sep 25 at 7:28 am
сайт микрозаймов [url=https://www.zaimy-13.ru]https://www.zaimy-13.ru[/url] .
zaimi_khKt
19 Sep 25 at 7:29 am
всезаймы [url=http://zaimy-15.ru/]http://zaimy-15.ru/[/url] .
zaimi_azpn
19 Sep 25 at 7:30 am
исторические фильмы [url=https://www.kinogo-15.top]исторические фильмы[/url] .
kinogo_sjsa
19 Sep 25 at 7:30 am
раздвижные карнизы для штор купить [url=www.razdvizhnoj-elektrokarniz.ru/]www.razdvizhnoj-elektrokarniz.ru/[/url] .
razdvijnoi elektrokarniz_wxei
19 Sep 25 at 7:31 am
What’s Taking place i’m new to this, I stumbled upon this I
have found It positively helpful and it has aided me out loads.
I hope to contribute & assist other customers like its aided me.
Great job.
https://www.shippingexplorer.net/en/user/tomhavertz/195900
19 Sep 25 at 7:31 am
все займы рф [url=http://www.zaimy-12.ru]http://www.zaimy-12.ru[/url] .
zaimi_asSt
19 Sep 25 at 7:31 am
займы [url=http://www.zaimy-11.ru]http://www.zaimy-11.ru[/url] .
zaimi_lsPt
19 Sep 25 at 7:32 am