u/Xeoncross
In this archive from Jan 2012 to Nov 2014
- 25
- posts
- 168
- comments
- 0
- media
- 729
- score
PHP loves markers
Is it just me, or does the PHP language love un-needed text markers? $ = $variable : = function name(): className {..} :+: = class::method() ; = return; vs other languages variable = 'foo' function name() className {...} class.method() return
Feedback on my idea for a slim ORM for all PDO results.
I was testing extending the PDO statement class to interject my own bare-bones class for PDO results. https://gist.github.com/Xeoncross/df5cf2e8666b7fed98f2 My idea was to make it easy for you to load related records (has, has_many, belongs_to, and even has_may_through) by simply calling a method on...
Community PHP Framework of gists (like Composer but for gists)
github.com/Xeoncross/UnitEngineBest way to check an array for existence of multiple keys?
The best way I've found so far is something like this: if($array === $array + array_flip(['keys', 'to', 'expect'])). Are there any better ways? Any problems with this? Basically, if any of the keys don't exist in the array then the new appended items will change the array: php > $array = [1, 1 => 2,...
Dealing with nested inheritance of variable scopes
Advanced: I am trying to figure out a clever way to allow nested values to be passed through scopes while picking up new additions keeping the child values as supreme. The best I've come up with so far is using a closure that is scoped to the presently available scope variables. Anyone have any poin...
PHP Templating with DOMDocument
camendesign.com/dom_templatingA unit testing framework in a tweet
gist.github.com/mathiasverraes/9046427Log IP addresses correctly using REMOTE_ADDR
gist.github.com/cballou/2201933A PHP program to compress, encrypt, and hide messages inside of PNG files as noise
github.com/jspark311/BuriedUnderTheNoiseFloorQuality GD Image library - clean, well designed source
intervention.olivervogel.net/imageHow do you manage many PHP projects? Lots of VMs?
I have been using a Linux install for a couple years now and it has development checkouts (and matching databases + live data) for dozens of sites. Since I create a new virtual host for each site there hasn't been any problems piling more and more projects into this system. However, this computer wo...
PHP microframework based on anonymous functions
gist.github.com/EmanueleMinotto/4648707PHP to JavaScript PCRE Converter
gist.github.com/4071739Non-blocking, asynchronous server in PHP
github.com/jimthunderbird/phastlightSecure PHP message system with front-end encryption/decryption.
github.com/UserScape/PasteVault"This should almost be 1" - PHP Mongo Docs
php.net/manual/en/mongocollection.insert.phpInversion of Control using Reflection (via anothergituser)
gist.github.com/2990773At least use Blowfish for password hashing
As Thomas H. Ptacek stated when discussing the recent password hash compromises of sites like Linkedin, "they’re using the wrong kind of algorithm. They use a cryptographic hash, when they need to use a password hash." For all you PHP'ers out there, don't use a fast algorithm like SHA-2 when creatin...
PHP developers need to join the new IDE "Light Table" project
Some of you have probably seen the new Light Table IDE that Chris Granger has been working on. If we want to see this awesome functionally come to the PHP world we need to join the project and start voicing our support so we aren't left behind other languages.
Does APC store closures?
I wanted to see what type of memory recovery I could get by removing closures when they are no longer needed, so I created a script that generated 100 closures (in an array so I could work with them) with about 100 lines each of fake objects, loops, and conditionals (valid code, but gibberish). I en...
1kB PDO-based MySQL, PostgreSQL, SQLite database library
github.com/Xeoncross/DByteAuthenticating, SSL SMTP client in 320 characters
gist.github.com/2002233PHP template inheritance (or moving view logic out of controllers)
github.com/Xeoncross/PHP-Template1kB PHP/MySQL Forum
gist.github.com/1503594End of this list.
Back to top