---
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%2F20261126%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261126T052413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=87ffbc99bfe5a4a2b51018b6199f81c72bdebadf478482bc13feb26ec08d2fbc)  

 ## 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%2F20261126%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261126T052413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=5ab52ed913e4fa0e08748dee467bbf04d8aa31934e204c71f6482718d307a17f)   Literary    

### Cherry-picking your way out of trouble

   Franco Gilio     Free      114 

   

 ](/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%2F20261126%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261126T052413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=9b20bd6d8ef35d05a5e323ff728b521937fcfb18906a82e5d3d0a39c6e1a7de7)   Literary    

### Going static, 2026 edition

   Franco Gilio     Free      77 

   

 ](/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%2F20261126%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261126T052413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=f6d0bd510b0843c09569581815176c85147ec692449e3c63de93bc87053d3480)   Literary    

### Going static, 2026 edition

   Franco Gilio     Free      80 

   

 ](/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%2F20261126%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20261126T052413Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=0f53e83a58265fa15d5589182fc87a5fed62b944dc8b2756890790fdfdff5777)   Literary    

### Going static

   Franco Gilio     Free      76 

   

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