Scott Keck-Warren
0:05
Hello developers, and welcome to the PHP Community Corner, where we have conversations with members of the web development community. I'm your host, Scott Keck Warren, and today we're talking with Gunnar Engerbreth about his talks at PHP Tech 2026. Gunnar began in software development during the dot-com boom of the 2000s in Atlanta, Georgia. The rapidly changing landscape of technology and needs created an environment full of learning opportunities. Beginning with Perl and moving quickly to PHP, he specializes in the modernization of legacy applications, APIs, and creating modern development team solutions. Gunnar believes in free open source software and has contributed to projects such as WordPress, The Devil Box, Discord PHP. As an author, Gunnar has written multiple articles for PHP Architect magazine, as well as 2 books from Apress Publishing on PHP 8. Gunnar has also been a notable speaker at multiple conferences such as PHP Madison, LonghornPHP, Techlahoma, and Chaos Carnival. Gunnar currently lives in the North Georgia Mountains with his wife, 2 boys, and some assorted animals. Thank you, Gunnar, for finding some time to talk to us today.
Scott Keck-Warren
1:10
Yeah. So I, I noticed that like one of the things that you're going to be doing, uh, next year in 2026, or I guess it's this year since we're doing this recording in advance, um, is that you're going to be talking at PHP Tech 2026. Um, and one of the topics you're going to be talking about is the OWASP Top 10. Can you give us kind of a brief overview of what that is and why that's important for developers?
Sure. So first off, it's great to just go back to the PHP Tech Conference. There's tons of great people, great speakers. It's an amazing event. And this is a talk that I've given before, but doesn't mean it's just rehashed information. The OWASP Top 10 actually changes every 3 to 4 years. Right now, currently, there's an RC for some of the latest information right now. If you want to go and be involved with that, you can check it out. But for anybody who doesn't know, like, the OWASP is an open-source organization. It's volunteer-run. And what they do is they put out basically, at this point, they put out categories of the top security vulnerabilities that are out there in the world that us as software developers need to be aware of. It used to be just specific hacks here and there, but now they're just general categories of, they take everything that you hear and don't hear on the news and the headlines and they classify them and say, here is what if you have a priority list, if you have a, if you need some kind of top-down tier list of things, we're going to go through and give you the vulnerability iceberg, if you will, and here's what you need to focus on, at least bare minimum. And so I came across this years ago, and I really feel like developers sometimes just miss the mark on watching out for security in their development, you know, and rightfully so. We're given problems that are, you know, that makes our heads turn and we bash against the wall and we talk to penguins and we talk to, you know, other things just to get something to work. The last thing on our mind is like, well, what if somebody types in, you know, and 1 equals 1 into the username box? You know, are they going to get, be able to hack in? It's like, we don't care. We just want this thing to work at this point. And this, what this talk specifically is about is like, you need to care, you need to be aware of it. And here's the easiest, it's, you know, lazy is in the title because it's kind of the laziest way. Like if you don't need to worry about a whole bunch of specific things, here's some libraries or here's what PHP has built in that will take away a lot of your research and time, and you can rely on this heavily to take some of that off of your shoulders. So hopefully the talk will get across some of these points about, take it seriously, put it in the back of your mind, and use these tools that are available. You don't have to reinvent the wheel. That's kind of the point here is help out your DevOps team, help out your, if you have a a red team or whatever at your organization, help those people out and give them a fighting chance of being able to protect your software. And nobody wants to be on the headlines with a hack or loss of data. Nobody wants that.
Scott Keck-Warren
4:53
Yeah. And I, so I actually like, I bring these more to the front of the mind, like when we're doing code reviews as like a, like, well, have we thought about this piece? Because like, it's usually like, these are, you know, these are the things that have caused like the most trouble within like the last 4 or 5 years or whatever they, the time period is that they're using. And so I'm always like, well, are we doing better than like the average whatever? You know what I mean? Like, and because like my favorite example is like the number one, like, uh, issue on like both the list from 2021 and 2025 was broken access control. And that's like, so common, right? And like, that's like my favorite thing to test for in like our, uh, in our software is I'm just like, well, can I access with this with somebody who's not supposed to have access, right? Like, it's just like such a, such a fast, like, oops, we made a mistake type situation. Um,
and, and the thing with the security, just like the broken access control, like it has necessarily nothing to do with SQL injection. So if you focus all your time and effort on, you know, ensuring that you're, you're protecting against injections, but you go into inspect elements, you replace, you know, ID equals 2 with ID equals 3, and all of a sudden you're in somebody else's account. It's like, oh, I forgot all about that.
Scott Keck-Warren
6:10
Right.
And, you know, go ahead. No,
Scott Keck-Warren
6:13
I'm sorry. So, and I always find it, I also find it very interesting to like look at the list and like see how it's changed. Because so as we're talking, like they're in that, that release candidate phase for like the new list of them. And, and like, it's, it's fascinating to me to like see, cause like they're always like shifting, like, you know, like I have like 10 and they like move around a lot, but like broken access controls at this has been at the top for a while. But the one that I find really fascinating is like injection used to be, is like slowly drifting its way down because like we have better and better tools to like prevent that, right? Like PDO makes it really hard for us to, to, to, to not have like an injection thing. Um, But is it so like when you look at like the list of them, like what is it you usually find like developers have a hard time getting their heads around?
So what it's really the 2 that I really focus on and I see are injection and also just prepared statements. I think there's 2 things like I could just put at the top of the list for developers when submitting a PR is like, are you checking $_SESSION_USERNAME or $_SESSION_COMMENT from user? It's kind of like the rules from the TV show House. It's like, never trust a user. Like, no, whatever they're typing in, just consider it horrible. And you need to look at it. You don't just set it equal to, you know, username or password and carry on with it. It's like everything needs to be sanitized, checked, make sure it's not null, make sure it's not empty. Like there's some basic things that you need to do. Also with, you know, with SQL queries, you know, the one thing that it seems, and I mean, I've been a victim to it too, like it didn't really sink in that prepared statements just squash all of this. Like injection basically goes away if you're using prepared statements. And it actually made more sense to me in like researching some of these talks that I've done on this is prepared statements squash this all because it takes 2 different paths to communicate with the database. There's one path that says like, what are we trying to do with this query? What's the query query text, like select and where, like all of the kind of adjectives, the verbs, and that gets sent down one path to the database. And then all the question marks that you're sending in your prepared statement, all the variables get sent as literals, like literally this. So they are 2 separate lines of communication with the database. And so if you're saying like, you know, select star from user where username equals, and the malicious hacker is saying, you know, admin space dash dash. So select where username equals admin and ignore everything else, comment out everything else. The parser, like PHP and MySQL, PHP mainly, if you're sending that query and you send admin with a couple ticks, on it to, you know, escape the ticks that you're putting in and that MySQL and PHP are putting in, the parser will get confused by those ticks, and that's where you'll be— the hacker will be allowed to add in the word admin and then the comment. Now, when you send it with a prepared statement, you're sending literally admin space dash dash as what you're looking for in the username table. And so you're going to come back with no, nobody with admin dash dash is a username. So this is how you can, it can be the same information. The hacker can be successful over here where they're not using a prepared statement and then use the exact same payload, the exact same text in a query where they're using prepared statements and it will fail because different data is being sent to the database. So, you know, when I heard that, I'm like, well, okay, that makes sense why prepared statements kill this whole thing and why we should always just be using them. When I see a PR that has raw, like it goes out of its way to make raw MySQL queries, it's like, okay, can we try this again? Like, can we do better? We have a whole system set up to type less things and get the results back and to make them secure. So let's do this. So I want to get that across too, is that prepared statements aren't just, you know, oh, it's just typing so many different things. Why can't I just do the one query I need? Or like, it's too complex. I'll have to break it up into different things. Okay, well, would you rather do that or lose, you know, 20 million records in a database hack? Like, because you didn't make it 5 lines instead of 3, like, let's put some priorities in there and make some things secure.
Scott Keck-Warren
11:34
Hmm. Yeah. And I guess like, I, that's one of the things I don't ever think about is that it is like a separate communication line. Like that is like a good, important factoid for, for people who are like tuning into this is like, that is, that's the reason that it's, that it's so much better, right? Is that like, it literally, like the database is going to do this piece of it just so much better than we ever could, right? Because it's like, I'm, I'm only doing this one thing, whereas we're doing like a million things.
And when, when you look at it, it doesn't really make sense. It's like, well, you're just replacing it with a question mark and then filling pulling it in back later with the variable you want. Like, that's the same thing, but it actually does communicate differently. So it, that I've just never heard that explained before by somebody, you know? So. Yeah.
Scott Keck-Warren
12:18
It's always fascinating to me too that we have, um, like, because there's all these like base level understanding of database pieces, um, that like developers have. And then like, there's this, these things where it's like, well, this is actually how it works. And then like so many people just don't even have an understanding. And then, and I get it, right? Like it's, It's just like one more thing to have to learn, but it is like an important piece. Like, well, this is why it's important that we know how to do this. I was just reading about like how transactions are like kept internally so that like they work properly and it's like mind-numbingly simple, but then like it has to, you know, there's all this like background data that it has to deal with, but it's just like, oh yeah, this is just like a simple solution to like transactions and how complex they can be.
Yeah. It's only until you run across a problem that you have like nothing makes sense and you're going down and then you get like, knee deep in a manual somewhere and you're like, oh, that's the exact reason why. You know, it's like there's limit 50 and we needed 51. Of course. Like nobody knew and nobody knew this.
Scott Keck-Warren
13:17
Yeah. Well, and the one that killed me is like, we had a, we had like a gr— uh, this is really like inside baseball. We had a group that then we did like a concatenation on and it was only, it like just cut off for some reason. And it's because like there's a maximum like length to like group concat. And we're just like, oh, but it took us like 2 days to figure that out. Yeah. So I think like the thing that I find most fascinating about like the new 2025 list, and I'm curious to see what your take on this is, that like one of the things that they've added is the software supply chain failures, which is like a fascinating piece of like the changes. Do you have some, are you going to talk about that a little bit in your talk or?
Well, yes and no. Like, yes, But it's one of those, like, it's clearly referencing third-party situations, and it's kind of like the npm thing that's popping its head up almost every week now, which is, oh, somebody put some malicious code into, you know, a huge, massively, you know, digested or ingested, you know, feature or, you know, npm package that that everybody uses. Nobody noticed this and everybody's now vulnerable because of it. And so I know I could probably say it's 50/50. I'd hope at least it's 50/50 of people who are like, yeah, just npm install whatever you need. We got stuff out there for it. And the other half is like, no, stop, don't, because you're just trusting a jillion strangers with having code in your code. And I see both sides of it. That's actually what this talk is about, is like, well, use the stuff that's already out there that people have written. So it's kind of one of those, like, you know, trust but verify, like, use it, make sure it's okay. And there are tools out there like Akita, and, you know, there's lots of tools now that will go through your repo in GitHub, check your code, make sure that there's no CVEs out there against any of the packages that you have, and will alert you if there are any. So that feels more reactive than proactive. Proactive is not using anything at all and keeping all your code internal and in-house, but then you lose the benefit of an npm or the community and people that have already spent months and years doing this stuff better than you can, you know, than you can right now. Like, given time, anyone can do it. But that's just one of those things. Like, it should be, it's on the list, it's number 3, and it should be there because it's taken down and messed up a lot of things. It's something to be aware of, but is it something that you can just say, oh, use prepared statements for? No. You just kind of have to scan every single day. You don't have to go and check all the websites yourself. There are tools that'll help you stay on top of these things, but that doesn't mean that you might not be affected. You'll just be aware of it hopefully sooner than later, or at least know a plan of action to get out of it that you can tell your boss and be that person instead of like, what do you mean it's down? Well, Let's just reboot it. Hopefully you'll be aware of those things. But no, that's an interesting addition, and I think it's just there because there's not a real solution to it, but it is a problem and you need to be aware of it when— because a lot of times we get, let's say in PHP, time zones are great and switching between them and working with time. is a fabulous feature in PHP, but let's say that there's this one-off package that solves the problem that you have with creating a calendar, and it does exactly what you want, but there's only like 100 people that use it. It was end of life 5 years ago, but it works great. It's like, this is what you need to— as a developer, you're like, this is perfect. It works. I love it. As anybody above you, like in, in your organization, they might have the thought of like, no, we can't use this. You know, it is too risky at this point. And that's, that's the awareness and that's the thinking that you, that is the more proactive thought. It's like, yes, it solves your problem, but it's not appropriate to use it this time. We can find a better way to, to do this. So that's going to be a problem that's going to be around for a while, if not forever. And the immediate solution is not that readily available.
Scott Keck-Warren
18:08
Yeah. And we use it, we at work, we use Akito to define problems. And thankfully it's never found anything where it's like, there's a critical security vulnerability in one of these packages that you have, because we try to keep it up to date. all of our stuff update anyways, but like, it is a terrifying piece that like somebody can just go in there and be like, oh yeah, I've like, you know, took over this one person's, like a maintainer of a package's access to GitHub. And now I can just put whatever I want in there and we're not going to notice. Yeah. I mean, like most people aren't going to notice. So.
And I think, I think the, the, you know, the long-term solution to that also is kind of on GitHub's part and also maintainers, there needs to be a better way to deal with repos that just end up dying or go unmaintained or something like that. Right now, it's pretty much community-based. Somebody wants to take over a repo, they have to go through a process, like asking. It's kind of a nice social process of asking about it, doing this and taking it over and being responsible that way. But Uh, there needs to be a way to like, to, to handle it better. I don't have that answer, obviously. Yeah. So I just sound like I'm rambling on this. I don't know what to do about it, but it's something that exists. And if that were to be solved, a lot of this would be easier to mitigate and be aware of and control.
Scott Keck-Warren
19:34
Yeah. We'll be back after this word from our partners. Every app builds up technical debt over time. It's the unfortunate price that we pay for shipping new features and moving fast. When we build up too much of it though, it can start to impact how we work. Team velocity suffers, bugs become more frequent and take longer to fix, and everyone starts to get a little bit frustrated. The key to managing debt is to measure it. A credit score can help you understand how well you're managing your debt, and now there's a credit score for technical debt. Go to php-score.com to get a free technical debt score and monitoring for all of your PHP applications today. Head over to php-score.com and get control over your technical debt. So, and that all sounds like a really interesting talk. I'm looking forward to trying to go see it, assuming that I'm not also talking at the same time. That's always like the challenging part of these. But the other thing you're going to be talking about is functional programming in PHP. Can you give us like a brief overview on that?
Yeah. My history with programming starts with functional because I've been doing this for like 30 years. So this was before the dawn of like, oh, before the dawn of PHP even, but how OOP is the way the— how everything should go. I was writing things that I would consider factories before the concept of a factory was there. I was writing things, I was like, I'm doing this thing a whole lot, but I'm just changing it a little bit. So let me write this thing that does, that builds these things, but changes them with the variable I throw at it. And so the concept of, like, the OOP concept and the functional concept has kind of divided a lot of the programming world, and most people jumped on OOP. And what I'm trying to show with this is that you don't have to necessarily be in one camp or the other. There's a lot of use in functional programming besides just like a singleton. Like it's just a one-off thing we're doing over here. Functional programming doesn't have to be in the realm of also like Rust or like these really low-level languages. Functional programming could be a way to solve the problems that you have easily without being messy. We're not just gonna include a functions.php and have all of these one-off things like we used to back in 1991, but we're gonna take a look at writing single purposeful reusable functions that don't cause us to go down the path of writing or implementing a ton of OOP things. We don't need to have a whole Laravel install or install Composer, install something if we're just trying to do one or two little features here and there. So that's kind of the basis of it is like, it's not a dirty word. It's not a scary word. Some of the unks like me who've been around, will hopefully look at it and go, oh yeah, this is how I used to think, and now I've changed a whole bunch of ways because of how we've been forced to, especially if you're in the Laravel world. If you're even newer in the Laravel world, you've never thought about this kind of stuff before because it's not how you do it. So just trying to get that out there again, that functional programming isn't just crazy low-level, mathematical stuff that is set aside over here. Like we can use it too in our daily lives.
Scott Keck-Warren
23:28
Yeah. And I always, the thing I always think, try to think about it is like, it's very powerful, especially for like in user space, right? Like there's a lot of like times where I'm just like, I can solve this easily by just chaining a bunch of functions together and then there, and then like, there you go. And so it doesn't have to be like an all or none. I'm a very much a like, OOP does what it's good at and functional programming does what it's good at. And there's like, my codebase is a mix of the two essentially, like wherever I see those pieces.
Yeah. Whenever I get too complicated in a function or a method I'm writing, like it does more than one specific thing, I start to, like the anxiety starts to build in me. I'm like, but what if I need something like this again that's different? You know? And I'm like, well, how can I take a step back and, you know, make this even more Versatile and usable. And that's when I get, yeah, like the chain mentality of like, do step 1, do step 2, do step 3. And like, it's so much easier. It's easier to read. And this is all my personal belief, but you know, you can pass it off to a developer and they can actually read it, understand it, see the logic in how things should flow, and work from there. So I'm a, I'm a little biased to it, but that's, again, that's just how I came up kind of programming. So that's how my mind was, was set and how, you know, things should work.
Scott Keck-Warren
24:56
All right. So, so I have to ask you about the cow, like, so, so why are the cows, like, how is it that you guys are, why is it you guys have decided to have cows and what do they bring to your family?
So yeah, my wife and I moved up here to North Georgia and the Blue Ridge Mountains about 5 years ago, 6 years ago. And, um, it's on, it's like 6 acres and there's already a built-in, you know, pasture area and everything. And we've, we've only owned dogs really our lives. And we're, we're up here in the wilderness, in the mountains. And, uh, just one of those like, It's one of those decisions and things in life you can't really prepare or plan for. And when opportunities come up to buy a cow with money that you have, when timing is right and a cow presents itself, you need to buy that cow. So we're like, all right, well, we'll figure it out. We're not going to let this cow die. We know that we can do that much, but we're going to figure it out. And so It was, you know, we've had cows, we've had goats, we still have a pig. We've had other pigs. I've built pig fences. I've chased pigs and got them back in the fence. I've chased cows to my neighbor's yard and tried to get them back into the fence. Got them back. This is all those things where it's like, you know, selfishly, it's fun. It's cool. It's kind of like, you know, man, like getting dirty, doing stuff, but also it allows me the time to like get away from a screen, from thinking, from doing all this stuff. I can worry about this dang pig and getting it back in its cage. And also, I can spin my cycles in my head and process a lot of stuff subconsciously. It's great to go out every morning and get a bale of hay and give it to the cow and dump some food in the bowl and make sure there's water. Just do these kind of things, collect eggs. I come back every morning with 4 to 6 eggs in my pocket and put them in their egg cartons and get 'em ready. It's just one of those things that I really enjoy now that takes me away from this because sometimes I'm even out there on a meeting, on a call, a Teams call for work, and I'm stepping over cow poop and doing all this stuff and they're talking about AWS environments and— You know, it's just one of those like, okay, it really allows me to just to get away while I'm out there. So I enjoy it. The cows are fine. We just had a calf the other day on Thanksgiving. So now we're hopefully going to get some milk. We'll be drinking that and enjoying it. But I like to live a life that is deep in one thing and completely opposite. Keep them guessing, but also it keeps me— You know, on my toes, 'cause I have no clue how to do any of this stuff.
Scott Keck-Warren
27:54
Yeah.
And I'm learning every day.
Scott Keck-Warren
27:56
I always find it interesting talking, 'cause I've had several conversations with other developers where like, 'cause a lot of what we do is very not tactical, right? It's like a lot of like moving atoms around and we're not really doing, you know, like there's no tangible like result to like what we build. But then there's these like things that they do off screen that are very, you know, like woodworking. I've heard, talked to woodworkers and musicians and, you know, like, and there's always, it's always interesting to hear like, well, I spent a lot of time in like, you know, computer space and now I want to go out and do something that actually like I can, you know, like can finish and can like see like, you know, physically see like the end result of. That's always really fascinating to me. So I do appreciate you finding some time to talk to us today. Is there anything else you want to direct our listeners to before I let you go?
Let's see. I've, so I have 2 books that I've written. I actually wrote them. This was like before AI, so I feel like I got in right before people start accusing people of not writing stuff. But 2 books on PHP, you can just type in Gunnard into Amazon. There's not many of us out there, and my name will pop up. One of them is on PHP 8 and how that came to be. I spent a lot of time researching the internals, communications back and forth. I read a lot a lot of emails, and just kind of bridge the gap between like who proposed it, who not opposed it, but who commented, and the story of how each one of those RFCs came to be actual features in PHP 8. I enjoyed it. I thought it was really interesting. And then another one, just basics on PHP 8. Give it to your 12-year-old cousin who doesn't know what to do in life or is trying to pick up Python and learn that. Give them a PHP book instead, send them the right way. But it's just your basic learn something from scratch, build a CRUD, and keep going from there. So yeah, that's about it.
Scott Keck-Warren
29:59
All right. And I will provide, there'll be links in the description for this to your website, which I do believe has links to those things. So that way you can get the Amazon affiliate credit. So check out his website, go from there.
If I'm worth any weight in my salt, I have those links there. If not, then shame on me.
Scott Keck-Warren
30:16
Yeah. All right. So thank you. I do appreciate all your time today and I look forward to seeing you at Tech. Yeah, absolutely.
Scott Keck-Warren
30:25
Yeah. So I had to say another heartfelt thank you to Gunnar for all of his time as well as yours for listening. If you're not already a subscriber, make sure you subscribe with whatever your preferred method is so you can get the episodes as soon as they're released and maybe share this post with a coworker so they can learn about some of the cool talks that are going on at PHP Tech 2026. Tickets are available. This podcast is available both in an audio version on the PHP Architect website, as well as a video version on our YouTube channel. This is Scott Keck Warren for the PHP Architect Community Corner signing off and reminding you to keep listening, keep coding, and keep reading.