---
title: "Discussion on \"The Difference Between Service Classes and Traits in PHP\" | Hashnode"
description: "Discussion on \"The Difference Between Service Classes and Traits in PHP\". Service classes and traits are both important tools in PHP development, but they serve different purposes."
url: "https://hashnode.com/posts/the-difference-between-service-classes-and-traits-in-php/62423710db84f8c50fa5b33e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The Difference Between Service Classes and Traits in PHP](https://blog.savetchuk.com/the-difference-between-service-classes-and-traits-in-php?utm_source=hashnode&utm_medium=feed)

Service classes and traits are both important tools in PHP development, but they serve different purposes.

Mar 28, 2022 · 3 min read · blog.savetchuk.com  
Updated Mar 3, 2023  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#laravel](https://hashnode.com/tag/laravel)

## Written by

[Andrew Savetchuk](https://hashnode.com/@AndrewSavetchuk)

@AndrewSavetchuk · Canada

  
[View profile](https://hashnode.com/@AndrewSavetchuk)

Software Engineer, Content Creator, and Open-Source contributor

Software Engineer, Content Creator, and Open-Source contributor

## Responses 1

Markdown supported · ⌘↵ to post

[Ola Duda](https://hashnode.com/@wokalove)

[Jul 27, 2022](https://hashnode.com/posts/the-difference-between-service-classes-and-traits-in-php/62423710db84f8c50fa5b33e/comment/62e11794657a4fae5a0e70bc)

Hi! Where are exactly described those differences between service and trait solution in this article? I mean - what are pros and cons using each of these and in which cases should be used.
