---
title: "Learn how to import a function() in PHP — Franco Gilio"
description: "TIL*¹ you can import just a function in a .php file, like we do with classes. It works from PHP 5.6+, so there&#039;s no weird compatibility issue. And it&#039…"
canonical: "https://publica.now/creators/franco-gilio/works/learn-how-to-import-a-function-in-php-1"
---

      Literary # Learn how to import a function() in PHP

    [  FG  

Franco Gilio

 

 ](https://publica.now/creators/franco-gilio)      Follow     

 

   

    Free      [ Sign in to read now ](https://publica.now/access?redirect=%2Fcreators%2Ffranco-gilio%2Fworks%2Flearn-how-to-import-a-function-in-php-1)    

   

   Share Link copied  

  Format epub 

   Published Mar 07, 2019 

  Rating  No reviews yet  

 

 

 

   ![Learn how to import a function() in PHP](https://fls-a13cb2d7-1b3e-4883-a0bd-297afd110a11.367be3a2035528943240074d0096e0cd.r2.cloudflarestorage.com/works/01kqmvw2sqrzpng8vj28c5hkd5/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261015T192526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=96c9ef508d7c5b969b54029c8b609cb777a2c2f4060ac66fd9230bc5f0dc5bea)  

 ## About this work

TIL\*¹ you can import just a function in a .php file, like we do with classes. It works from PHP 5.6+, so there's no weird compatibility issue. And it's dead simple. Here's an example from Safe PHP, sp…

 

     [ #code ](/search?query=code) [ #tutorials ](/search?query=tutorials)  

 ## Reviews

  No reviews yet. Be the first to share your thoughts.  

  [Sign in to leave a review](https://publica.now/access?redirect=%2Fcreators%2Ffranco-gilio%2Fworks%2Flearn-how-to-import-a-function-in-php-1)

   No reviews yet. Be the first to share your thoughts.

 

  

 

 

 

    More from Franco Gilio

## Works

  

  [See all →](/creators/franco-gilio)  

  [  ![Cherry-picking your way out of trouble](https://fls-a13cb2d7-1b3e-4883-a0bd-297afd110a11.367be3a2035528943240074d0096e0cd.r2.cloudflarestorage.com/works/01kmn1mt2d7vkaxf4027gn5mb8/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261015T192526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=481d15c050d8ae626e605dc0567f476709f0e0254cdb6ae3cce028920a40d0a2)   Literary    

### Cherry-picking your way out of trouble

   Franco Gilio     Free      102 

   

 ](/creators/franco-gilio/works/cherry-picking-your-way-out-of-trouble) [  ![Going static, 2026 edition](https://fls-a13cb2d7-1b3e-4883-a0bd-297afd110a11.367be3a2035528943240074d0096e0cd.r2.cloudflarestorage.com/works/01kqmk5pjda9hrrmhe9c7r8hfr/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261015T192526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=e7a0f527019aa3d4d9067a1d3f97d8bba9a3f7c6edba18e038d7bc62fcf76c8b)   Literary    

### Going static, 2026 edition

   Franco Gilio     Free      62 

   

 ](/creators/franco-gilio/works/going-static-2026-edition) [  ![Going static, 2026 edition](https://fls-a13cb2d7-1b3e-4883-a0bd-297afd110a11.367be3a2035528943240074d0096e0cd.r2.cloudflarestorage.com/works/01kqmvw1ts32872f2g8j91zj6c/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261015T192526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=d917beb392d735e2f80a0410571085e1ec9fbbb48ebd6df4d2d2763ef5adc405)   Literary    

### Going static, 2026 edition

   Franco Gilio     Free      65 

   

 ](/creators/franco-gilio/works/going-static-2026-edition-1) [  ![Going static](https://fls-a13cb2d7-1b3e-4883-a0bd-297afd110a11.367be3a2035528943240074d0096e0cd.r2.cloudflarestorage.com/works/01kqmk5pvmykqf5z0ta58hgyb5/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261015%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261015T192526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=8ca4ee0ae9a5fce82cc49fecc309561f7febc8585fdea0dbcc1e581acac93b42)   Literary    

### Going static

   Franco Gilio     Free      60 

   

 ](/creators/franco-gilio/works/going-static)  

  



  Free  

  [ Sign in to read now ](https://publica.now/access?redirect=%2Fcreators%2Ffranco-gilio%2Fworks%2Flearn-how-to-import-a-function-in-php-1)
