Replacing ereg_replace() with preg_replace() in PHP for Regex Handling
If you’ve kept an old PHP app alive long enough, you’ve probably hit the wall: you bump the server to PHP
A collection of web development tutorials and code snippets for WordPress, PHP, JavaScript, CSS and many more.
If you’ve kept an old PHP app alive long enough, you’ve probably hit the wall: you bump the server to PHP
You upgrade a server to PHP 7, and a script that ran fine for a decade dies with Call to undefined
You inherit a form. Whoever built it wrapped every user field in strip_tags() and marked the ticket “sanitized.” It looks tidy,
You upgrade to PHP 8.2, run your test suite, and the logs fill up with deprecation notices pointing at utf8_encode() and
You open an old PHP file and it’s wall-to-wall array( … ). Somewhere a linter or a teammate is nudging you
You’ve spent 29 days writing JavaScript. This is where the series ends, and it’s the one day that pays the other
One unescaped string is all it takes. A comment box, a search field, a URL parameter, someone drops a <script> tag
You have hit this bug even if you never named it. Click a button, the page locks up for half a
Day 27 of the 30-day JavaScript journey. So far most of what we’ve built renders in the browser: the server ships
Load a chat app, type a message, and it shows up on someone else’s screen a fraction of a second later.
You have spent 24 days writing JavaScript that runs first and complains later. A typo in a property name, a number
You build a site, it works great, then someone opens it on a train that dives into a tunnel and the
You need a user’s name and email. The REST endpoint hands you back the whole user object: forty fields, three of
You’ve solved the same problem more than once. A global that everything reaches into and nobody owns. A settings object that
For 20 days you’ve written JavaScript that runs in a browser. Day 21 is where that changes. In our 30 Days
Tab through enough of the web and the cracks show fast. A menu that won’t open from the keyboard. A button
A page that snaps between states feels broken even when it works fine. Toggle a menu open instantly and people flinch.
Day 18. You’ve written a fair bit of JavaScript by now, and some of it has probably bitten you: a function
You’ve spent sixteen days on syntax and logic. Today you point JavaScript at the real world and ask it what the
You’ve probably copied the same dropdown, the same modal, the same star-rating widget into three projects, then watched each copy drift