Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mghayour's full-sized avatar

M Ghayour mghayour

View GitHub Profile
@mghayour
mghayour / is_rtl.php
Last active May 10, 2021 20:31 — forked from khal3d/is_rtl.php
Check if there RTL characters (Arabic, Persian, Hebrew)
<?php
/**
* Is RTL
* Check if there RTL characters (Arabic, Persian, Hebrew)
* this function works in fuzzy mode
*
* @author Khaled Attia <sourcecode@khal3d.com> Mahdi Ghayour <me@mghayour.ir>
* @param String $string
* @return float betwwen 0~1, (0 for ltr and 1 for rtl)
* @example if( is_rtl($string) > 0.5 ) { // do sth }
@mghayour
mghayour / telegram_crash_reporter.php
Created April 8, 2017 21:45
this php file report php fatal errors to your telegram account
<?php
/*
this php file report php fatal errors to your telegram account
setup :
1- search for "//TODO: edit this" and edit that !
2- include it before all
3- enjoy debuging fast as possible
*/
function shutdown_report_it() {