Skip to content

Instantly share code, notes, and snippets.

View gabiudrescu's full-sized avatar

Gabi Udrescu gabiudrescu

View GitHub Profile
<?php
$sites = "http://www.broadcastsolutions.com.au/
http://www.kvm.com.au/
http://www.ambertech.com.au/";
$sites = preg_split('/\r\n|\r|\n/', $sites);
echo "
@jamesmoey
jamesmoey / ExtendedArrayCollection.php
Last active July 24, 2023 07:02
Extend array collection from Doctrine with operation to perform on all the item in the collection.
<?php
namespace Collections;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\PropertyAccess\PropertyAccess;
class ExtendedArrayCollection extends ArrayCollection
{
/**
@ngfw
ngfw / BaseConverter.php
Last active January 9, 2025 23:15
PHP BaseConverter
<?php
declare(strict_types=1);
class BaseConverter
{
/**
* The character set used for base conversion.
* Includes digits 0-9 and lowercase and uppercase letters A-Z.
* The minimum base is 2 and the maximum base is 62.
@Koc
Koc / gist:3016704
Created June 29, 2012 08:42
Doctrine2 DISTANCE function
<?php
namespace Myako\Geographical\Functions;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\Lexer;
/**
* "DISTANCE" "(" LatitudeFrom, LongitudetFrom, LatitudeTo, LongitudeTo ")"
*