Skip to content

Instantly share code, notes, and snippets.

hakre hakre

Block or report user

Report or block hakre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nikic /
Last active Apr 15, 2019
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:


$a = 1;
$c = $a + $a++;
ircmaxell / equality.php
Last active Apr 19, 2019
Unicode Set Functions
View equality.php
const= true;
const= false;
function ≠($left, $right) {
return $left != $right;
function ≅($left, $right) {
MadaraUchiha / mysql_comment.markdown
Last active May 9, 2019
Don't use MySQL functions in PHP - Comment for Stack Overflow
View mysql_comment.markdown
[**Please, don't use `mysql_*` functions in new code**]( They are no longer maintained [and are officially deprecated]( See the [**red box**]( Learn about [*prepared statements*]( instead, and use [PDO]( or [MySQLi]( - [this article]( will help you decide which. If you choose PDO, [here is a good tutorial](

Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

hakre /
Last active Oct 5, 2015
SO copypad

This question appears to be off-topic because it is about ...

Tutoring with a software named Wordpress, here a Tutorial for Extending it with a specific Plugin and an individual Theme.

Tutoring a Software Product named Magento.

a very individual problem without given any further reference to commons in programming in a useful manner. See also: Stack Overflow question checklist

a Debugging request of larger chunks of non-isolated code that may (or may not) contain the code the question asks about. Instead the code should be reduced the a bare minimum example code that outlines the problem and question in a compact and self-explaining manner.

View special-background.php
* Special Background Wordpress Plugin
* @-wp-header Plugin Name: Special Background
* @-wp-header Plugin URI:
* @-wp-header Description: Example to show how to add a special background using exiting background admin page in core.
* @-wp-header Version: 0.2
* @-wp-header Author: Mike Schinkel, hakre
* @-wp-header Author URI:
evaisse / remove_accents.function.php
Created Aug 18, 2009
php function to remove accent from the input string string. An example string like `ÀØėÿᾜὨζὅБю` * will be translated to `AOeyIOzoBY`
View remove_accents.function.php
<?php # -*- coding: utf-8 -*-
// function remove_accents()
* Unaccent the input string string. An example string like `ÀØėÿᾜὨζὅБю`
* will be translated to `AOeyIOzoBY`. More complete than :
* strtr( (string)$str,
* "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ",
* "aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn" );
You can’t perform that action at this time.