During all these ages I spent on various PHP forums, I've got a small collection of funny or peculiar issues that I want to share.
I am the only person to hold a gold badge in
on Stack Overflow and I am eager to show the right way for PHP developers.
Besides, your questions let me make my articles even better, so you are more than welcome to ask any question you have.
Click here to ask!
Please refrain from sending spam or advertising of any sort.
Messages with hyperlinks will be pending for moderator's review.
Markdown is now supported:
If you want to get a reply from admin, you may enter your Eómail address above
I would like to ask for some convert help = php 5.2 to php 7.4.33 and from mysql to msqqli - about 40 php files - maybe you can give me a tip, whom to ask
Yes I can give you a tip, though I don't like it.
You can download this file,
put it on your server and include it above mysql_connect().
Your old mysql functions would start working in 7.4
However, it's better to rewrite all files to prepared statements.
Hi there. Just wanted to thank you for your prepared_query() helper function. It's been incredibly helpful!
I appreciated the reply to my PDO recursive array question. You suggestion totally fixed the issue of nested foreach loops. Also, you tutorial on how to call multiple stored procedures saved hours of time, and has opened up the usage of stored procedures in my php code exponentially. Thank you.
Hey - I just found your site and wanted to say I've really enjoyed reading your articles. I have been a hobby PHP programmer for a few years now and I'm always looking for ways to help be cut through the clutter. I appreciate the approach you take and just wanted to say so.
Is this still an active site? I don't see dates - just curious if you are still working on PHP and developing articles.
Thank you to taking time to stop by!
Yes this site is sort of alive, though I seldom add new articles. Rather fixing the old ones. And answering to comments, as best as I can :)
Damn man thnks alot for saving my whole day you guys have made my sunday by giving a accurate and fair answer to my PDO!! I tried stackoverflows examples but it didnt works but when i use my universal brain with your solution then i am done !! Going for nightOut cuzz of you guys!!!! Thanks again and keep it up the good work
Can you provide some good examples that help to learn using object syntax (->) in procedural PHP.
I saw a reply of yours on the topic on stackoverflow and wanted to learn further on that.
Hey, I hated to see that you were "banned" from SO because you ' tirelessly chased people who wrote bad answers'. I really despise bad or simplistic answers as well. You really helped me on an issue that was driving me nuts (regarding checkboxes).
Seems like, instead of complaining, people should try to learn something if/when the comment is tactful and informative.
I adhere to your recommendation to NOT output any (php) error messages to the browser (say, via a directive in htaccess on the live server).
My question is how to output a useful message to the website visitor?
Example: I have a page which allows my client to upload language CSV strings to a database. I DO want them to be able to notify me of a generic error description if the process fails. So, if I use mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); then how can I output a generic error to the browser - especially if the db code is contained in a "DB" class as you recommend here:
You have to create an error handler. The idea is that you create a single funtion that will handle all errors at once. There is a simple example in the related article, https://phpdelusions.net/articles/error_reporting#error_page
It's only a basic implementation, feel free to modify it for your needs.
Congratulations for site quality. Yours articles help me in complicated php project.
I am sorry for posting on your website as it's.
My post has nothing to do with the above mentioned.
I was hoping to have direct contact with you via mail to and i will explain in details why.
Was not able to find any other way.
I left my email so you can contact me.
Looking forward to hearing from you.
I use myself eclipse PDT, not bad at all (but memory-hungry because, well, it's eclipse)...
You say that most of the problems with PHP can be solved by a good IDE. What is your recommendation in that area?
Thank you for the good question!
I meant that any good IDE has a code completion feature, that will suggest you both a function name as soon as you start typing it, and its arguments and their order. So you don't care for the alleged "inconsistency" in the functions naming or parameters.
I would recommend two IDEs - one is paid, which costs $90, called PHPStorm, I am using it myself, and every day I am discovering new wonderful feature.
Another one is NetBeans, which is free but still very rich with features. Both are multi-platform and work on any OS.
Feel free to ask if you have any other question!
Is it possible with PDO to make a MySQL connection without using a password?
Not sure what you mean and which driver you are using, but at least you can provide an empty password if password for your database is empty.