---
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"
---

      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)    

   

   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/01kqmk5qrx36becff86pxhy8r6/cover.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=d29ce3bb571c165c97a702f29f7aee93%2F20261011%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261011T163416Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=f3dec4ae9f15c128a54759359a5a518d7735319b48a49da00dec8ddf6282eee8)  

 ## 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)

   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%2F20261011%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261011T163416Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=f610808094f08c88366b8d8c8351e2900348db2acca600c7732b0126d2c001b8)   Literary    

### Cherry-picking your way out of trouble

   Franco Gilio     Free      101 

   

 ](/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%2F20261011%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261011T163416Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=057091edd882307d4c2125b325e9796188d5068dd5fe1eeecb199e6c6ffffb68)   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%2F20261011%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261011T163416Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=a8a96e02ae4e086370109f3e6399098d380862b01f4344aa9bb7fa0571a48ebc)   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%2F20261011%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261011T163416Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=68a227fd0ad24b2b5edbac88cebcbf2334d408fbe74aa0b4501d549384875ab2)   Literary    

### Going static

   Franco Gilio     Free      59 

   

 ](/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)
