Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
PHP Programming

PHP Programming

a feed for everything related to & everyone interested in PHP Programming.
Custom RSS/AtomCustom RSS/AtomCustom RSS/Atom
PHP Programming
Rafael Dohms - PHP Annotations: They Exist! at Laracon 2014 - http://www.reddit.com/r...
submitted by travisfont [link] [4 comments]
PHP Programming
Use PHP+SQL+AngularJS for new scheduler/membership project? - http://www.reddit.com/r...
Working on a scheduling/membership app for health clubs, martial arts, etc. Prototype is done and now it's time to bring it to life. This is a pretty standard database-heavy line of business app but I'd like it to feel more like an iPad app than the boring-ass schedulers out there like Appoint Plus or Mind Body. Would like it to be reactive. For example, when someone scans in with their card I'd like it to show up immediately on the admin console. Meteor looks fantastic but they do not have reactive SQL support. Yes, I should write the adapter myself, but I'm late on the project :-O Am guessing that the state of the art is Laravel with AngularJS. My DBMS of choice is PostgreSQL but whatever the back end it will be used as a vanilla SQL option via PDO so I can swap it out if necessary. Would welcome any suggestions. Thanks! submitted by tomcam [link] [comment]
PHP Programming
Secure file storage for multiple users - http://www.reddit.com/r...
I've been trying to track down an outline for a multi-user secure file storage system. I don't plan to roll my own and use it in production, but the thought experiment has turned into wanting to play around with AES encryption in PHP, and that has turned into thinking about how I would implement various file storage scenarios. The easiest scenario would be a single user who wants to store a file and access it later, where they would use their password to encrypt the file and to later access the file. The key wouldn't be stored on the server anywhere, so if they lost it then the file would be unrecoverable. But how do companies handle systems where the files need to be encrypted, but also shareable? I've thought up a couple of possible systems, but I think this is the best one I've come up with: User A logs in to their account and uploads a file. User A's file gets encrypted using a random key. The key is then encrypted using user A's password (this would mean that changing your...
PHP Programming
Why should I code in OOP? - http://www.reddit.com/r...
Hello, People tell me that I need to learn how to code in OOP, now I know I need it for PDO and I have no problem with using that, but what is the point of using it? I am always fine without using it and everything works as I have planned it to work. submitted by mothh9 [link] [18 comments]
PHP Programming
Bower vs BowerPHP - http://www.reddit.com/r...
submitted by travisfont [link] [8 comments]
PHP Programming
PDO to MySQL via round-robin dns, stalling - http://www.reddit.com/r...
I have a MariaDB+Galera multi-master cluster (4 nodes). Running code against the cluster via connecting to an individual node runs very quickly. I have round-robin DNS configured to try and load-balance the future load against the database cluster. Internal DNS: nslookup mariadbfarm0.mydomain.com Server: 192.168.2.202 Address: 192.168.2.202#53 Non-authoritative answer: Name: mariadbfarm0.mydomain.com Address: 192.168.2.152 Name: mariadbfarm0.mydomain.com Address: 192.168.2.153 Name: mariadbfarm0.mydomain.com Address: 192.168.2.154 Name: mariadbfarm0.mydomain.com Address: 192.168.2.155 If I connect to the cluster via the RR DNS entry such as: $db = new database_pdo('mysql:dbname=devwiki;host=mariadbfarm0.mydomain.com', 'someusername', 'somepassword'); it seems the 'first' connection takes ~2 seconds but repeated connections afterwards are very speedy. If the code is left alone for a while and I execute it again, it stalls again. Running nslookup from the command line of that server...
PHP Programming
"Office Hours" for PHP? - http://www.reddit.com/r...
I want to see if there's demand for something like this: I'm thinking of allocating 2-4 hours/daily to let anyone book a chunk of my time to ask questions and or chat about PHP/WebDev/DevOps with me. Totally free and no strings attached of course. I was thinking of using: https://ckdarbyinc.setmore.com/ You can find out more info about me here: https://www.linkedin.com/in... https://github.com/ckdarby https://twitter.com/ckdarby submitted by ckdarby [link] [34 comments]
PHP Programming
Drupageddon vs. Suhosin - http://www.reddit.com/r...
submitted by _rs [link] [comment]
PHP Programming
PHP7 Type Hinting Callable return values? - http://www.reddit.com/r...
So I know PHP7 is introducing type hints for return values of functions. My question is: is there going to be a way to type hint the return values of callable's sent as inputs to a function? One reason I think this could be useful is for dependency injection with lazy loading. Instead of passing in an instance of an object, one could pass in a function that loads the object on demand. For example: function loadUser(): User { return new User(); } class UserWidget { private $userLoader; private $user; public function __construct(callable:User $loader) { $this->userLoader = $loader; } private function user(): User { if (is_null($this->user)) { $this->user = $this->userLoader(); } return $this->user; } public function doSomethingToUser() { $this->user()->doSomething(); } } $widget = new UserWidget('loadUser'); $widget->doSomethingToUser(); The key here is in the constructor of UserWidget. I know you could do this with reflection class or just by doing an is_a on the function call...
PHP Programming
10up Engineering Best Practices - http://www.reddit.com/r...
submitted by speckz [link] [2 comments]
PHP Programming
PHP internals trolling :) - http://www.reddit.com/r...
submitted by drgomesp [link] [11 comments]
PHP Programming
CodeIgniter Announces an Interim Council - http://www.reddit.com/r...
submitted by mpmont [link] [comment]
PHP Programming
Why does a function make a variable NULL? - http://www.reddit.com/r...
I have something like this here: var_dump($RAW_SOM); function BSI_compare($Age, $Gender, $column, $value){ //Some code here } Seems self explanitory. $RAW_SOM gets dumped on the screen like normal. But when I add the var_dump($RAW_SOM); in the function like this: function BSI_compare($Age, $Gender, $column, $value){ var_dump($RAW_SOM); } Then $RAW_SOM is NULL. What is going on and how do I fix this? submitted by LordZikarno [link] [6 comments]
PHP Programming
Displaying Registered Users Without Plugin - http://www.dzone.com/links...
If we have user registration on our WordPress blog or website, we may want to show our users on different sections of our website. As for an example, we can display a list of authors with avatars, or add an author info box, etc.
PHP Programming
Create Secure Joomla Extensions - PHP CMS Framework - http://www.dzone.com/links...
In this article, we are going to discuss about How to create secure extentions in Joomla. It's no secret that most compromised Joomla sites are exploited through third party extensions.
PHP Programming
Printer - AJAX style page loading jQuery plugin - Advanced PHP Tutorial - http://www.dzone.com/links...
Printer is an AJAX style page loading jQuery plugin that retrieves the URL from each hyperlink in the sidebar on the fly upon being clicked.
PHP Programming
International PHP Conference Spring 2015 - http://php.net/confere...
PHP Programming
Functional Programming in PHP - http://www.reddit.com/r...
submitted by gatisl [link] [3 comments]
PHP Programming
json_encode/decode array of objects - http://www.reddit.com/r...
I'm making a web page that will allow a json array to be edited. I'm using PHP to receive the new object ($product) and put it into the array ($productArray). Array looks like this [{"name":"A","Vendor":"Admiral Craft Equipment","Group":"Counter Top","SubGroup":"Induction","PartNumber":"Counter Top:Induction:IND-B120","MfgPN":"IND-B120","UM":"Each","id":"Induction Cooktop","pic":"pics/generic_product.jpg"}, {"name":"B","Vendor":"Admiral Craft Equipment","Group":"Counter Top","SubGroup":"Oven","PartNumber":"Counter Top:Oven:COQ-1750W","MfgPN":"COQ-1750W","UM":"Each","id":"Oven, Convection, 1/4 Size","pic":"pics/generic_product.jpg"}, {"name":"C","Vendor":"Admiral Craft Equipment","Group":"Counter Top","SubGroup":"Warmer","PartNumber":"Counter Top:Warmer:FW-1200WR","MfgPN":"FW-1200WR","UM":"Each","id":"Warmer, Round","pic":"pics/generic_product.jpg"}] Using angularjs which does not serialize before sending so handled a little unorthodoxly in the beginning <?php if (...
PHP Programming
Implementing a queue system in php - http://www.reddit.com/r...
What have you used to implement a queue system in php? A lot on google turns up Gearman, which i've used before, but its not really ideal for a queue system (its more for async background tasks) Also i need to limit each 'thing' on the queue to be done at most once per second. Any ideas on how to implement this? submitted by myaltergo [link] [5 comments]
PHP Programming
smooth Jquery dropdown menu - http://www.dzone.com/links...
This is a smooth example of dropdown menu for the developer, who want to use it in their website.
PHP Programming
Question: Do you use $GLOBALS or not? - http://www.reddit.com/r...
I'm just looking back over someone elses old code that uses $GLOBALS within functions to carry settings. At first I was like "ugg", however I'm looking and struggling to find a best practice reason that suggests a good reason not to do this... I know Register_globals has been DEPRECATED, but not $GLOBALS. I'm sure there's good reason not to use $GLOBALS but I can't seem to see a definitive answer. Any ideas? submitted by jpswade [link] [68 comments]
PHP Programming
Designing a DSL with interfaces - http://www.reddit.com/r...
submitted by davedevelopment [link] [comment]
PHP Programming
Natural Three Column - http://www.dzone.com/links...
Natural Three Column is a free Genesis child theme. This theme is bright, clean and feature-rich. Whether you’re creating a business website, blog or online magazine, this theme has what it takes to get the job done for you. In this child theme include features such as 6 page layouts, custom menus, footer widgets, responsive layout, threaded comments.
PHP Programming
Composer: It's ALMOST Always About the Lock File - http://www.reddit.com/r...
submitted by gooserider [link] [14 comments]
PHP Programming
Suggest a php project to develop for my 3 years degree - http://www.reddit.com/r...
Hi all, For my 3 years degree in computer science I want to develop something in php, can you bring me some idea? Reply with all kind of ideas! :D I don't want to make another WordPress-like cms :) Thank you so much submitted by Dom9301 [link] [19 comments]
PHP Programming
PHP Code Editor - http://www.reddit.com/r...
submitted by _-1 [link] [3 comments]
PHP Programming
Using microtime(true) + mt_rand() to generate primary keys? - http://www.reddit.com/r...
submitted by Xeoncross [link] [8 comments]
PHP Programming
Codex - A Markdown (flat-file) documentation application built with Laravel 4.2 - http://www.reddit.com/r...
submitted by kai_desu [link] [14 comments]
PHP Programming
PHP loves markers - http://www.reddit.com/r...
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 submitted by Xeoncross [link] [4 comments]
Other ways to read this feed:Feed readerFacebook