Bot Factoids

Search Database

50 Results:


For details, /msg php-bot g#, where # is a guideline number, or 0) Help us stay on topic; 1) Be polite; 2) Just ask, we're here to help; 3); 4) Try rephrasing the question; 5) Use a pastebin; 6) Minimize noise; 7) We focus on PHP; 8) We want you to learn; 9) Please check the docs first; 10) Take governance debates to private chat.


Guideline #10) Discussions of the guidelines or channel governance should be moved to private chat; please do not bog down the channel with these topics. You can email all chanops at instead.


If you have a question, please just *ask it*. And don't address specific people - ask the channel. If somebody knows, they'll answer. :) To get help more quickly, don't ask "can I ask a question," "can anyone help," or "does anybody use/know about foo". Be as specific as you can. Also, please don't /msg people without permission, and read the topic before you ask.


No, we cannot recommend <whatever you asked about>. We're here to help you write PHP code, not spend hours arguing the relative merits of A versus B. We won't recommend packages, libraries, scripts, sites, languages, version control systems, or sports teams; our only recommendation is that you please take your recommendations questions elsewhere (e.g.,


The X-Y problem is when you want to do X, but you don't know how. You think you can hack X if you can just do Y, but you don't know how to do Y either. You ask (us) for help with Y. We think Y is a strange problem to want to solve... So just ask us about X. [See: ]


PDO is PHP Data Objects, a database API that has a unified interface for many databases. You can learn how to use PDO here:


Guideline #8) We want you to learn to write PHP for yourself; we may ask you to relocate conversations that conflict with that goal (e.g., systems that are too complex, obscure, or have their own support mechanism)


You have just been %s from ##php. Duration: %s. Reason: %s


White Screen Of Death: If you're seeing a blank page (and view-source is empty), please read

error reporting

Set `error_reporting = -1` in your php.ini (to see errors on your webpage, also set `display_errors = 1`) and be sure to restart your webserver/fastcgi-listeners. Using `ini_set()` and `error_reporting()` is less reliable - for example, in the case of parse errors. See or "/msg php-bot error logging" for more.


Guideline #7) If it's not PHP, we probably aren't the best place to assist you. Try: #sql, #mysql, #postgresql; #httpd, #nginx; #linuxhelp / #linpeople / distro channels (e.g. #ubuntu); #html/#css/##javascript, #web. It *is* OK (within reason) to ask if anyone here would be willing to join another channel to discuss a non-PHP question you need help with.


Guideline #1) Whether helping, seeking help, or somewhere in between, please be polite and patient.


Guideline #3) Read if you haven't read it before. We firmly believe adhering to the ideas there will help you get quality assistance here.


Guideline #2) Don't ask to ask; "I have a question," "Is anyone around?" or "Can anyone help?" are noise. Just state your question; see for help formulating your question.

cyth template engine

Looking to use or make a template engine? Check out cyth's example here:


Guideline #9) ##php is a manual *supplement*. Please try finding your answer in the manual at FIRST. It is frustrating to repeatedly answer the same questions, that's why we created the documentation.


Guideline #4) Don't spam your question. If nobody answers your question, don't just repeat it verbatim. Try different ways of rewriting the question, make sure that you are providing as much information as possible.


[TIAS] Try It And See. If you want to know if or how something works, try it first. "Testing Is Absolutely Simple"


Read before asking another question, that is, if you want a smart answer.


Guideline #6) Maximize signal, minimize noise; spam/ads/advocacy, trolling people, job postings, and auto-away/back messages are considered noise here. '/msg php-bot jobs' for more info on job postings.


Hi there!


Guideline #5) Don't flood or paste code. Use a pastebin such as or


[GO] Gross Overgeneralization. Everything that we tell you in ##PHP is what we consider "best practices". Of course, only YOU know your own requirements, so you may feel you need to do something we told you not to. Just don't say we didn't warn you.


No job posting or asking for jobs on ##php, please (see /msg php-bot g6). You may want to check out or or (##PHP does not affiliate with any of these channels/sites).


Guideline #0) The base for all other guidelines: try to keep ##PHP focused on technical help for PHP problems. We strive for a minimum of noise here.


I have no help file


Don't use the enter key as punctuation. Think in complete thoughts, then type.

mysql is old

ext/mysql was deprecated in PHP 5.5.0 and is removed in PHP 7.0. For new projects use mysqli ( or PDO ( The MySQL developers developed guidelines and a script for migrating your code Most people here recommend PDO:

php first

your PHP code can be sorted into two categories: code which _performs work_ (processing input, controller logic, database access, error handling, etc.), and code which _produces output_ (header(), echo, <?= $var ?>, plain ol' <html>, etc.). work goes FIRST. output goes LAST.


Questions about specific IDEs and IDE discussion in general usually degrades rapidly due to personal preference. It is not a valid topic for ##php.

next please

another satisfied customer, NEXT!


If you are getting error like "Warning: Cannot modify header information - headers already sent by (output started at /path/file.php:1)" it means you've got some output before your header() call or starting a session. *No* output can be sent. that includes whitespace (outside of <?php and ?>) and any (X)HTML. You can also use output buffering


If you have to ask "Does anyone here use foo" or "Are there any baz experts around" you're just taking a survey. You'll likely get an answer quicker if you just ask specifically what you need help with.

doesn't work

"doesn't work" or "not working" is not a useful metric to debug or solve your problem. More information is needed to address the issue you are experiencing. For example, start by: providing the code in question; describing what you expect the code to do; what it's doing that you didn't expect; and include all error information relevant to your issue (see error reporting) in a pastebin.


another satisfied customer, NEXT!

pdo_mysql connect

How to use PDO to connect to MySQL:

using crypt is blocked by many corporate firewalls and - in some cases - by entire countries; please don't use it for sharing code. Try something like; if you want to exec the PHP, try,, or


int error_reporting(int new_error_level=null) - Return the current error_reporting level, and if an argument was passed - change to the new level -

off topic

Prefixing a question with "I know this is off-topic, but..." doesn't magically make it on-topic. (Nor does postfixing a question with that.) If it's not on-topic here, please don't ask -- we get plenty of noise in the channel already and there are thousands of other channels on Freenode alone to chat in.


Don’t use XAMPP or WAMP. Use a real dev server on a VM. Install VirtualBox and Vagrant, then head over to


Don't use w3schools

third party

##php does NOT support third party applications. However, there are limited solutions: 1) Ask in the corresponding channel of the application, 2) Contact the authors/vendors, etc

pdo_mysql prepare

How to prepare a statement using PDO:


[PEAR] PHP Extension and Application Repository, a library and distribution system for reusable PHP components. ##PHP does not support PEAR, please see #pear, efnet/#pear, or


usort closure

function buildSorter($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; } /* use strnatcmp($a->$key, $b->$key); instead if you need to sort objects */


< rasmus> PHP is ugly. It was meant to be ugly. If you don't like ugly, don't use PHP.


Arguments about frameworks are not a valid topic for ##php; if your question is re:a specific framework, you may want to try them in their own support channel: Zend Framework: #zftalk; Drupal: #drupal-support; Symfony: #symfony; SilverStripe: #silverstripe; CodeIgniter: #codeigniter; Laravel: #laravel; and so on.


mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count]) - Replaces all occurrences of search in haystack with replace -