---
title: "Discussion on \"It is an argument, not a trojan horse!\" | Hashnode"
description: "Discussion on \"It is an argument, not a trojan horse!\". Let's talk about something cool: trojan horse parameters.\nThis is how I call this fancy technique which many of us, developers, might have used (or still doing). Ok, so what is it?\nAs a daily work, you face a problem, think about a solution and start..."
url: "https://hashnode.com/posts/it-is-an-argument-not-a-trojan-horse/5fdab6b41485f22e24b30cee"
---

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

Discussion

# [It is an argument, not a trojan horse!](https://blog.medunes.net/it-is-an-argument-not-a-trojan-horse?utm_source=hashnode&utm_medium=feed)

Let's talk about something cool: trojan horse parameters. This is how I call this fancy technique which many of us, developers, might have used (or still doing). Ok, so what is it? As a daily work, you face a problem, think about a solution and start...

Dec 17, 2020 · 5 min read · blog.medunes.net  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#php7](https://hashnode.com/tag/php7)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#refactoring](https://hashnode.com/tag/refactoring)
-   [#object-oriented-programming](https://hashnode.com/tag/object-oriented-programming)

## Written by

[medunes](https://hashnode.com/@medunes)

@medunes · Munich, Germany

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

Senior Software Developer.

I try to solve problems from bare metal to abstractions and just make it work.

## Responses 1

Markdown supported · ⌘↵ to post

[Ivan Nikulin](https://hashnode.com/@vansanblch)

[Jan 9, 2021](https://hashnode.com/posts/it-is-an-argument-not-a-trojan-horse/5fdab6b41485f22e24b30cee/comment/5ff9dc17aa5c467fe1558abf)

From my experience, the main problem with flag parameters is not that you have two I dependant logic in a function. The problem that such parameters "slightly" change behavior. For instance, a flag that tell to send an email with results. Or flag that require to skip (or run) validation. And so on.
